-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support long parameter name for PANOSE, to match glyphsLib #1102
Conversation
Glyphs supports longer alternative names for some of its parameters, with the short name taking precedence: https://github.com/googlefonts/glyphsLib/blob/050ef62c52906bc8ca820e7cfc6963138253f41f/Lib/glyphsLib/builder/custom_params.py#L322-L323 https://github.com/googlefonts/glyphsLib/blob/050ef62c52906bc8ca820e7cfc6963138253f41f/Lib/glyphsLib/builder/custom_params.py#L258-L269 This commit adds support for the longer name for the PANOSE values custom parameter, and tests that it is parsed and that its precedence is handled correctly, to improve parity with glyphsLib builds.
assert_eq!(Some(expected), context.static_metadata.get().misc.panose); | ||
assert_eq!(expected, context.static_metadata.get().misc.panose); | ||
|
||
// long parameter name |
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.
Could you please make these separate tests instead of having one test that does three seperable checks?
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.
Yes, good shout - I've split them now
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.
LGTM other than a couple of nits
Thank you! |
glyphsLib supports longer alternative names for some of its parameters, including PANOSE (albeit with the short name taking precedence). This PR adds support for the longer name, and tests that it is parsed and has its precedence weighed correctly.
With this change, most of the OS/2 diff for Noto Sundanese is resolved; an unrelated diff in
xAvgCharWidth
remains.Before:
After:
Note: this is a personal contribution independent of my employer, and so I've submitted from a fork under my personal profile and email to make this distinction