You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to build font files from .glyphs source (repo link) and having this Expected glyph class definition or statement: got NAME condition error.
Earlier in that Cn Th master (in it only) were Add Feature custom parameter and special threeCahrs/twoChars classes for ligatures.
I’ve deleted all of these and now settings for Cn Th master seem to me as identical to other masters. However something’s still wrong.
Glyphs app generates a variable font without problems.
I’m out of ideas on what could cause it. Could someone help me?
% gftools builder sources/config.yaml
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:fontmake.font_project:Building variable fonts ../fonts/variable/Martian Mono-VF.ttf
Traceback (most recent call last):
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontmake/font_project.py", line 1065, in run_from_designspace
self._run_from_designspace_interpolatable(
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontmake/font_project.py", line 1157, in _run_from_designspace_interpolatable
self.build_variable_fonts(
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontmake/font_project.py", line 384, in build_variable_fonts
fonts = ufo2ft.compileVariableTTFs(
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/__init__.py", line 596, in compileVariableTTFs
vfNameToBaseUfo = _compileNeededSources(
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/__init__.py", line 785, in _compileNeededSources
ttfDesignSpace = compileInterpolatableFunc(
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/__init__.py", line 384, in compileInterpolatableTTFsFromDS
for source, ttf in zip(result.sources, ttfs):
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/__init__.py", line 318, in compileInterpolatableTTFs
compileFeatures(ufo, ttf, glyphSet=glyphSet, **kwargs)
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/__init__.py", line 507, in compileFeatures
otFont = featureCompiler.compile()
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/featureCompiler.py", line 127, in compile
self.setupFeatures()
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/featureCompiler.py", line 262, in setupFeatures
featureFile = parseLayoutFeatures(self.ufo)
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/ufo2ft/featureCompiler.py", line 49, in parseLayoutFeatures
doc = parser.parse()
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontTools/feaLib/parser.py", line 105, in parse
statements.append(self.parse_feature_block_())
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontTools/feaLib/parser.py", line 1738, in parse_feature_block_
self.parse_block_(block, vertical, stylisticset, size_feature, cv_feature)
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontTools/feaLib/parser.py", line 1982, in parse_block_
raise FeatureLibError(
fontTools.feaLib.error.FeatureLibError: /Users/roma/Code/mono/sources/master_ufo/MartianMono-CnTh.ufo/features.fea:154:1: Expected glyph class definition or statement: got NAME condition
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/roma/Code/mono/myenv/bin/gftools-builder.py", line 83, in <module>
builder.build()
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/gftools/builder/__init__.py", line 192, in build
self.build_variable()
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/gftools/builder/__init__.py", line 294, in build_variable
output_files = self.run_fontmake(source, args)
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/gftools/builder/__init__.py", line 334, in run_fontmake
FontProject().run_from_glyphs(source, **args)
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontmake/font_project.py", line 787, in run_from_glyphs
self.run_from_designspace(designspace_path, **kwargs)
File "/Users/roma/Code/mono/myenv/lib/python3.9/site-packages/fontmake/font_project.py", line 1080, in run_from_designspace
raise FontmakeError(
fontmake.errors.FontmakeError: In 'Martian Mono.glyphs' -> 'master_ufo/MartianMono.designspace': Generating fonts from Designspace failed: /Users/roma/Code/mono/sources/master_ufo/MartianMono-CnTh.ufo/features.fea:154:1: Expected glyph class definition or statement: got NAME condition
The text was updated successfully, but these errors were encountered:
The problem is not the replace feature; it's the variable feature code in the rlig feature:
feature rlig {
#ifdef VARIABLE
condition 140 < wght < 180;
sub dollar by dollar.bold;
sub cent by cent.bold;
condition 120 < wght < 180, 3 < wdth < 5;
sub dollar by dollar.bold;
sub cent by cent.bold;
#endif
} rlig;
This is a non-standard, Glyphs-specific extension variable feature syntax. (Thanks, Glyphs!)
I’m trying to build font files from .glyphs source (repo link) and having this Expected glyph class definition or statement: got NAME condition error.
Earlier in that Cn Th master (in it only) were Add Feature custom parameter and special
![image](https://user-images.githubusercontent.com/1148914/182015940-3d8ae403-1682-4b11-b72a-caf90f3820c2.png)
threeCahrs
/twoChars
classes for ligatures.I’ve deleted all of these and now settings for Cn Th master seem to me as identical to other masters. However something’s still wrong.
Glyphs app generates a variable font without problems.
I’m out of ideas on what could cause it. Could someone help me?
The text was updated successfully, but these errors were encountered: