-
Notifications
You must be signed in to change notification settings - Fork 51
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
glyph.export is not used when writing ufos #320
Comments
I think the current strategy here in https://github.com/googlei18n/fontmake/blob/master/Lib/fontmake/font_project.py#L301 Are you proposing that |
I don’t really care who is doing it. Right now, nobody is taking care of it. And I have implemented in glyphsLib almost. |
I was using fontmake to generate a variable font from a .glyphs file. It failed because there are some glyphs that have incompatible outlines. Those are set to not export. After only putting the right glyphs in the ufo, it still complains about the kerning classes as I have not yet fixed that. It is much easier to deal with the kerning classes in glyphsLib instead of cleaning it up in fontmake. |
As a side note, I’m trying to run the builder directly in Glyphs. And is works quite well (after fixing a tone of tiny things here and there, both in glyphsLib and in Glyphs itself). |
Aren't the glyphs that are not exported also muted in the designspace? |
Cool! Did you run the one from the master branch or the one from the |
I stuffed all my changes in this repo. I’ll make nice commits when I’m done. https://github.com/schriftgestalt/glyphsLib/tree/some-adjustments |
I see that is a |
It's in this PR: #244 Have a look at the README from my branch which has examples of how to go from designspace to Glyphs: https://github.com/belluzj/glyphsLib/blob/real-ufo-roundtrip/README.rst#go-back-and-forth-between-ufos-and-glyphs |
Right. And fontmake is using the fonttools subsetter only after ufo2ft has generated the full TTFs that also include the non-export glyphs. I know it sounds convoluted, but it allows us to rely on the subsetter to decompose the components whose base glyph was dropped, and subset the GSUB/GPOS table (without having to do that on the features.fea ourselves). The conversion to quadratic is done in cu2qu and the latter doesn't know about these export flags, simply tries to convert glyphs with same name. Maybe it should be made aware of them, and skip. |
@schriftgestalt I have introduced three functions that I use extensively in tests (so you can see examples): to_designspace(GSFont) -> DesignspaceDocument
to_ufos(GSFont) -> List<defcon.Font>
to_glyphs(DesignspaceDocument | List<defcon.Font>) -> GSFont |
As I'm gradually moving more and more of the functionalities from fontmake (the compiler CLI) to ufo2ft (the compiler library), I think this subsetting-by-export-flag step should also move to ufo2ft.postProcessor |
as long as someone takes care of it.. |
When glyph.export is False, the glyph should not be written to the final font file.
And, if a component points to it, it this component needs to be decomposed.
I tried to add that functionality but it became a mess very quickly so I’m not doing it right.
The text was updated successfully, but these errors were encountered: