-
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
Add a phase that eliminates mixed contour+component glyphs; legal in source but not binary #123
Conversation
68da0bc
to
0a2845a
Compare
0a2845a
to
2763d99
Compare
2763d99
to
88a0413
Compare
This can generate more glyphs and update static metadata.
88a0413
to
8e0b0f6
Compare
Currently, the expectation from font developers for such mixed contour-component glyphs (based on established font editors' behavior, and followed by fontmake itself) is that they should get decomposed to simple glyphs, but it looks like you went the other way around and decided to upgrade them to full composite glyphs (by pushing the contours to separate glyphs and compositing from those). |
Tbh I was not aware that the font developer would expect that; we don't have to do it this way if it's important. I was indeed imagining this might contribute to size savings. |
well yes, I'm quite sure that's what all the font editors do in this situation (decompose mixed glyphs) |
@anthrotype pointed out this approach consumes additional gids whereas reducing a path + components to a single simple glyph does not. |
Per IM will update to match behavior of existing compilers. Conveniently that's actually simpler. |
@anthrotype notes in ufo2ft the recursive function that accomplishes that task is called deepCopyContours |
Another option might be to keep the behavior but off by default |
@khaledhosny mentioned FontForge defaults to converting to simple glyphs but also has a script command to do what my initial implementation here does. |
This is now the default behavior but can be flagged off. |
…tmake-rs using 0.0.6 is deemed incompatible because the leftmost non-zero of the version changed
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 good! Functionality seems solid. Left some suggestions inline for style, readability and comments.
Split IR glyphs with contours and components - observed in Lexend - apart such that a glyph with both migrates its contours into a new glyph then references that glyph as a component.
Update the ACL rigging to accomodate; we need the ability to express the ability to write to any glyph including those we've never seen before because we're creating them.
Fixes #125 by converting glyphs with different component definitions at different positions in designspace to simple glyphs.
Split out from #120 to make review more tractable.
The most interesting changes are in fontir/src/glyph.rs.