unified-font-object / ufo-spec

The official Unified Font Object specification source files.
http://unifiedfontobject.org
175 stars 30 forks source link

openTypeHeadCreated, but no openTypeHeadModified? #214

Closed anthrotype closed 1 year ago

anthrotype commented 1 year ago

is there a reason why UFO fontinfo allows to specify openTypeHeadCreated but not also openTypeHeadModified?

https://unifiedfontobject.org/versions/ufo3/fontinfo.plist/#opentype-head-table-fields

It can be useful to freeze both of these fields when one wants to achieve reproducible builds. Right now, fontmake (via ufo2ft and fonttools) allows one to optionally set SOURCE_DATE_EPOCH environment variable, which is used to define both the head table's created and modified fields (by default these are set to the current time making the build non-reproducible). Encoding the two time-related pieces of info (instead of just one of them) directly inside the source files could be an alternative option to setting the environment variable. Besides, the latter has no effect on head.created when openTypeHeadCreated is defined in fontinfo.plist.

benkiel commented 1 year ago

If I had to venture a guess, the lack of openTypeHeadModified is because of an assumption that one would want to have this be changed when the font was changed. That said, I think you have a valid use case and would accept a PR adding this as an optional element, with a clear statement as to why one may want to set this, rather than having it be set by a complier. Make sense?

rsheeter commented 1 year ago

I would love to have this so we could have reproducible builds w/o needing things like https://reproducible-builds.org/docs/source-date-epoch/

benkiel commented 1 year ago

Yes, just need a PR for an update @rsheeter or @anthrotype. I'm time blocked on doing so right now

benkiel commented 1 year ago

@rsheeter and @anthrotype: does adding this as a public lib key make sense? I don’t think that having it in info would be a breaking change, but it would mean a version bump, but doing so just for this seems more effort for all tools than is worth it (?)

anthrotype commented 1 year ago

yes, that could work for the meantime

benkiel commented 1 year ago

OK, will PR that.

benkiel commented 1 year ago

Closed by #222