Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unconditionally overwrite meta.creator on writing #123

Closed
madig opened this issue May 11, 2021 · 6 comments · Fixed by #134
Closed

Unconditionally overwrite meta.creator on writing #123

madig opened this issue May 11, 2021 · 6 comments · Fixed by #134
Milestone

Comments

@madig
Copy link
Collaborator

madig commented May 11, 2021

Since the creator value is meant to represent the writer of the UFO, norad should always write down itself there. I don#t think it is necessary anymore to refuse writing out UFOs not created in norad.

Annoying edge case to think about: save() should not modify self, so it would ignore what the user put into meta. This is slightly iffy.

@cmyr
Copy link
Member

cmyr commented May 11, 2021

good call, I would like to remove 'not created here' from this release.

@cmyr cmyr added this to the 0.4.0 milestone May 11, 2021
@alerque
Copy link

alerque commented May 12, 2021

I agree this should be the default, but disagree about "unconditionally". I would like to enable using this library to twiddle things and normalize files where the user may be using another library to actually write the files themselves. The most obvious direction no normalize in is stripping out this meta data entirely, but another way of handling it should be to not mess with the value from what was read in. There should be a conditional flag of some kind about whether or not to update meta.creator. It should default to true, but there should be a way to use the library without getting into a source diff tug of war with some other app in a pipeline.

@madig
Copy link
Collaborator Author

madig commented May 12, 2021

Hm. Creator is supposed to be "The application or library that created the UFO", so we have no choice in this matter 💀

@alerque
Copy link

alerque commented May 12, 2021

Pshaw. Yet another thing about normalization I should take upstream to the UFO spec. I think it is wrong to have this as a required field.

In the mean time what if I want to use this library in my application and write the value of my application name. That would be another use case for this being something the library allows options for. The application name is arguably quite a bit more revealing/useful than the library used by the application (as the latter can be derived anyway.

@cmyr
Copy link
Member

cmyr commented May 12, 2021

I am in favour of making norad as generally useful as possible, within reason, and exposing an option to let the user override or ignore this field doesn't feel unreasonable.

That said, I'm really not sure where this option should live? I could possibly imagine some set of config options that can be set on a Font object, but this is slightly tricky; for instance if any of these options influenced behaviour when reading a file from disk, we would want to provide it to the open method. I guess this could work sort of like DataRequest?

If this is mostly just about options for serialization, we could also split it out and have a save_with_options method. I could imagine this also being somewhere that the user could specify whitespace, etc?

cmyr added a commit that referenced this issue May 13, 2021
@cmyr
Copy link
Member

cmyr commented May 13, 2021

I've gone with just unilaterally writing us out as the creator, for now. I'm open to ideas about customizing this behaviour in the future, maybe when we also expose other options like customizing whitespace?

@cmyr cmyr closed this as completed in #134 May 14, 2021
cmyr added a commit that referenced this issue May 14, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants