googlefonts / googlefonts/fontmake
non-letter anchor names raise feature syntax error
- Dominant language
- Python
- Stars
- 888
- Forks
- 97
- Avg merge
- 4d 52m
- Merged PRs (30d)
- 1
Description
1. `wget https://github.com/madig/cantarell-fonts/raw/master/src/Cantarell.glyphs`
2. `fontmake -g Cantarell.glyphs -o otf`
```
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:glyphsLib:Parsing .glyphs file
INFO:glyphsLib:Casting parsed values
INFO:glyphsLib:Loading to UFOs
INFO:glyphsLib.util:Writing master_ufo/Cantarell-Regular.ufo
INFO:fontmake.font_project:Building OTFs
INFO:fontmake.font_project:Decomposing glyphs for Cantarell-Regular
INFO:fontmake.font_project:Removing overlaps for Cantarell-Regular
INFO:fontmake.font_project:Saving OTF for Cantarell-Regular
Traceback (most recent call last):
File "/home/nikolaus/.local/bin/fontmake", line 11, in
sys.exit(main())
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/__main__.py", line 183, in main
project.run_from_glyphs(glyphs_path, **args)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 378, in run_from_glyphs
designspace_path, instance_data=instance_data, **kwargs)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 434, in run_from_designspace
interpolate_layout_from=interpolate_layout_from, **kwargs)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 473, in run_from_ufos
ufos, remove_overlaps, **kwargs)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 175, in build_otfs
self.save_otfs(ufos, **kwargs)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
return func(*args, **kwds)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontmake/font_project.py", line 295, in save_otfs
font = compileOTF(ufo, optimizeCFF=subroutinize, **compiler_options)
File "/home/nikolaus/.local/lib/python3.6/site-packages/ufo2ft/__init__.py", line 42, in compileOTF
featureCompiler.compile()
File "/home/nikolaus/.local/lib/python3.6/site-packages/ufo2ft/featureCompiler.py", line 40, in compile
self.setupFile_featureTables()
File "/home/nikolaus/.local/lib/python3.6/site-packages/ufo2ft/featureCompiler.py", line 145, in setupFile_featureTables
filename=feapath)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/feaLib/builder.py", line 25, in addOpenTypeFeaturesFromString
addOpenTypeFeatures(font, featurefile)
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/feaLib/builder.py", line 16, in addOpenTypeFeatures
builder.build()
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/feaLib/builder.py", line 78, in build
self.parseTree = Parser(self.file, self.glyphMap).parse()
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/feaLib/parser.py", line 53, in parse
statements.append(self.parse_markClass_())
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/feaLib/parser.py", line 500, in parse_markClass_
self.expect_symbol_(";")
File "/home/nikolaus/.local/lib/python3.6/site-packages/fontTools/feaLib/parser.py", line 1330, in expect_symbol_
self.cur_token_location_)
fontTools.feaLib.error.FeatureLibError: /tmp/master_ufo/Cantarell-Regular.ufo/features.fea:124:1: Expected ';'
```
The same file exports without errors from Glyphs. I used #anchors in constructing e.g. `/n`, is it related to that?
Contributor guide
Assessment
This issue has not been assessed yet.