-
Notifications
You must be signed in to change notification settings - Fork 44
need only build glyf (or CFF) + hmtx for sparse layer masters #308
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
Comments
when no horizontal/vertical header table is present, we assume numberOfHMetrics == maxp.numGlyphs. This allows to compile/decompile incomplete fonts, only containing head, maxp, hmtx, loca and glyf (or CFF), that is the bare minimum to temporarily store glyph outline and metrics data for use with sparse/intermediate master TTFs in varLib. See googlefonts/ufo2ft#308
There is one problem though. I chatted with @behdad and I suggested to use an unlikely magic number for post.underline{Position,Thickness}, both defined as
(I had initially suggested 0x8000 or -36768, but I think 0x7FFF is even less likely than the latter) I'm still a bit reluctant to add that hack, but I don't see other solutions really, if one wants to be able to read post glyph names from a sparse TTF master, while at the same time ignoring the post underline values for MVAR. |
Fixes googlefonts#308 The OutlineCompiler classes gets a tables keyword argument that allows to customize the list of tables to be built. For the interpolatable sparse masters (those built from non-default layer) we only build (head, maxp, hmtx, loca, glyf, and post) for TTF, and (head, maxp, CFF and hmtx) for CFF-OTF.
Fixes googlefonts#308 The OutlineCompiler classes gets a tables keyword argument that allows to customize the list of tables to be built. For the interpolatable sparse masters (those built from non-default layer) we only build (head, maxp, hmtx, loca, glyf, and post) for TTF, and (head, maxp, CFF and hmtx) for CFF-OTF.
Fixes googlefonts#308 The OutlineCompiler classes gets a tables keyword argument that allows to customize the list of tables to be built. For the interpolatable sparse masters (those built from non-default layer) we only build (head, maxp, {h,v}mtx, loca, glyf, and post) for TTF, and (head, maxp, CFF, {h,v}mtx and VORG) for CFF-OTF. NOTE that varLib still doesn't support vmtx or VORG, but we output them anyway.
currently, when designspace source descriptors have a layerName attribute, the
ufo2ft.compileInterpolatable...
functions will build a whole master font for them, including global such as hhea, OS/2, name, etc. which do not vary from the default UFO masters. This means varLib will attempt to use these to build, e.g., an MVAR.These "sparse" or intermediate masters only differ from their associated "whole" master UFO for the layer, in which only glyph outlines and metrics are stored. Thus, ufo2ft should only build hmtx and glyf (or CFF) for these intermediate masters.
The text was updated successfully, but these errors were encountered: