Cannot set post table format 3 in TTF variable font using UFO key
See original GitHub issueBecause of this line forcing False
instead of passing None
it doesn’t seem to be possible to set post
table format 3.0 with only the UFO key <key>com.github.googlei18n.ufo2ft.keepGlyphNames</key> <false/>
For most fonts it will probably work fine as is, but when the font contains 65535 glyphs it can fail while running through the names (that seems like a whole different issue in fontTools, but can be ignored for this case). The fontmake
error is a bit useless:
fontmake: Error: In 'Test.designspace': Generating fonts from Designspace failed: unsigned short is greater than maximum
That’s only useful if you know that it means the post
table (2.0) and that it means you are trying to add indices > 65535 to the array at https://github.com/fonttools/fonttools/blob/7878c32a85b93296141b35d15b909eff220e46a9/Lib/fontTools/ttLib/tables/_p_o_s_t.py#L172
If I change False
to useProductionNames
then it will make post
format 3.0 and compile fine.
The same line is in compileVariableCFF2
, but that will fail for different reasons so my question here is what’s the reason to set this to False
instead of passing the value along?
Issue Analytics
- State:
- Created 3 years ago
- Comments:31 (17 by maintainers)
Top GitHub Comments
because: compileVariableTTF delegates to compileInterpolatableTTFsFromDS (or OTFs) to build the masters, but we don’t want to process the production names for each individual master, we only want to do the renaming (if any) one time at the end, on the varfont itself. We don’t want any glyph renaming to happen before we build the VF, because designspace can contain rules that reference glyphs using the human-readable names (not the uniXXXX production names).
Then we should probably check that a glyph named “cid00000” exists as well and is the first glyph, in which case assume .notdef is already present and don’t make one up.