version 4.35.0 breaks our tests in gftools
See original GitHub issuev4.35.0 breaks two of our builder checks, https://github.com/googlefonts/gftools/runs/7839959593?check_suite_focus=true#step:5:186. Here’s the traceback
ERROR:root:In 'Lora.glyphs' -> 'master_ufo/Lora.designspace': Generating fonts from Designspace failed: <fontTools.feaLib.ast.GlyphName object at 0x108267610>
Traceback (most recent call last):
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/fontmake/font_project.py", line 1065, in run_from_designspace
self._run_from_designspace_interpolatable(
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/fontmake/font_project.py", line 1157, in _run_from_designspace_interpolatable
self.build_variable_fonts(
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/fontmake/font_project.py", line 384, in build_variable_fonts
fonts = ufo2ft.compileVariableTTFs(
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/__init__.py", line 596, in compileVariableTTFs
vfNameToBaseUfo = _compileNeededSources(
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/__init__.py", line 785, in _compileNeededSources
ttfDesignSpace = compileInterpolatableFunc(
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/__init__.py", line 384, in compileInterpolatableTTFsFromDS
for source, ttf in zip(result.sources, ttfs):
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/__init__.py", line 318, in compileInterpolatableTTFs
compileFeatures(ufo, ttf, glyphSet=glyphSet, **kwargs)
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/__init__.py", line 507, in compileFeatures
otFont = featureCompiler.compile()
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/featureCompiler.py", line 127, in compile
self.setupFeatures()
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/featureCompiler.py", line 265, in setupFeatures
writer.write(self.ufo, featureFile, compiler=self)
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/featureWriters/baseFeatureWriter.py", line 131, in write
return self._write()
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/featureWriters/cursFeatureWriter.py", line 119, in _write
feature = self._makeCursiveFeature()
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/featureWriters/cursFeatureWriter.py", line 26, in _makeCursiveFeature
gsub = self.compileGSUB()
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/featureWriters/baseFeatureWriter.py", line 321, in compileGSUB
gsub = compileGSUB(self.context.feaFile, glyphOrder)
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/ufo2ft/util.py", line 230, in compileGSUB
addOpenTypeFeatures(font, featureFile, tables={"GSUB"})
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/feaLib/builder.py", line 64, in addOpenTypeFeatures
builder.build(tables=tables, debug=debug)
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/feaLib/builder.py", line 227, in build
gdef = self.buildGDEF() # build unconditionally so we can warn below
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/feaLib/builder.py", line 763, in buildGDEF
gdef.MarkGlyphSetsDef = self.buildGDEFMarkGlyphSetsDef_()
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/feaLib/builder.py", line 822, in buildGDEFMarkGlyphSetsDef_
return otl.buildMarkGlyphSetsDef(sets, self.glyphMap)
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/otlLib/builder.py", line 2618, in buildMarkGlyphSetsDef
self.Coverage = [buildCoverage(m, glyphMap) for m in markSets]
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/otlLib/builder.py", line 2618, in <listcomp>
self.Coverage = [buildCoverage(m, glyphMap) for m in markSets]
File "/Users/marcfoley/Type/fonttools/Lib/fontTools/otlLib/builder.py", line 58, in buildCoverage
self.glyphs = sorted(set(glyphs), key=glyphMap.__getitem__)
KeyError: <fontTools.feaLib.ast.GlyphName object at 0x108267610>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/fontmake/__main__.py", line 620, in main
project.run_from_glyphs(inputs.glyphs_path, **args)
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/fontmake/font_project.py", line 787, in run_from_glyphs
self.run_from_designspace(designspace_path, **kwargs)
File "/Users/marcfoley/Type/fonttools/venv/lib/python3.10/site-packages/fontmake/font_project.py", line 1080, in run_from_designspace
raise FontmakeError(
fontmake.errors.FontmakeError: In 'Lora.glyphs' -> 'master_ufo/Lora.designspace': Generating fonts from Designspace failed: <fontTools.feaLib.ast.GlyphName object at 0x108267610>
I’ve narrowed it down to commit https://github.com/fonttools/fonttools/commit/e4c5c842f1638c2debd801ebc35cafd8a0e346fe.
To replicate, download the attached file and do: fontmake -g Lora.glyphs -o variable
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turns out the fix is obvious, once you have a type checker. 😃
I’ll include this in the upcoming Big Type-Checking PR.
This is a typing problem in ast.py/parser.py. I’ve tracked it down but the fix is less obvious.