-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add public.fontInfo
to designSpaceLib specification
#3358
Add public.fontInfo
to designSpaceLib specification
#3358
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See notes about language
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed some instances of "should" to "must" in compliance with the UFO spec and RFC 2119
I recently needed to find the UPEM of a designspace. Does this address that? Or I still have to look into the UFOs? |
in theory, it could, yes. If the public.fontInfo lib key is present and defines unitsPerEm, it would override the one in the sources, like other fontinfo attributes defined in there. However it's unlikely that one would want to use the public.fontInfo key to override unitsPerEm (strictly override i.e. use a different value than the UFO sources have), because that would change the relative scale of all the outlines coordinates. This new proposed lib key is mostly for other kind of metadata that one would like to differ from the default UFO source fontinfo (e.g. names), or for when the same default UFO source is referenced in different variable-font elements. Anyway, the answer is yes, technically one should check the new public.fontInfo first, following the precendence order i.e. in the global DS.lib (as Jany proposed), then inside the specific variable-font lib, finally inside the default UFO source fontinfo. We shall probably add some methods to lookup fontinfo attributes for the whole designspace or particular VF/instances within it that take into account this inheritance logic. |
…ppear in the root lib, and defining the order of inheritance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporated feedback into a new commit
@belluzj @anthrotype I updated the lib definition, have a look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very clear to me, thanks!
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
@anthrotype corrections made, thank you! |
Thanks @colinmford - Now we'll need to think about how to implement support for this, in ufo2ft, designspaceLib and varLib |
Fixes #2608, Fixes #2606, and Fixes #3272.
This PR was requested by @belluzj.
This PR adds the proposed
public.fontInfo
lib item to thedesignSpaceLib
specification, with examples as discussed in #2608.@belluzj @khaledhosny @anthrotype I very much welcome a review and feedback. This is my first time contributing to the designSpaceLib specification and I'm sure I got something wrong here or there. I really believe in the power and flexibility this lib item could provide if it is supported by build tools, so I tried to be as specific as possible in its description.
Thanks!