Skip to content
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

if not all masters have .notdef, building VF can fail if generated .notdef is incompatible #381

Closed
anthrotype opened this issue May 27, 2020 · 1 comment · Fixed by #387

Comments

@anthrotype
Copy link
Member

ufo2ft always add a .notdef glyph, even for sparse layers. Often the main masters have .notdef already, but the sparse layers do not, and ufo2ft adds one (by using the font metrics to draw the rectangle). However, this generated .notdef may not be interpolation-compatible with the existing .notdef glyphs in the other masters.
This can lead to varLib errors when generating a variable font. I noticed that CFF2 variable output is more likely to fail with an error, whereas for TT-flavored VF it passes silently (the two nested rectangles happen to be interpolatable but the interpolation still is incorrect, as they may swap place, etc.).

We probably should not add a .notdef glyph for sparse layers sort of masters.

@anthrotype
Copy link
Member Author

We probably should not add a .notdef glyph for sparse layers sort of masters.

actually, we cannot not add a .notdef, glyphID 0 must always be .notdef (plus fonttools doesn't let us save CFF font without .notdef), so we have to add a compatible .notdef glyph to all the sparse masters if they do not have one already, which is what #387 does. We take the .notdef from the default base master and copy it over to all the other masters that do not already have one (which is mostly the sparse ones).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant