[feaLib] backslash-prefixed glyph names not supported
See original GitHub issueGiven the following feature file:
@group = [\f \i];
feature liga {
sub @group by f_i;
} liga;
Traceback:
Traceback (most recent call last):
File "C:\Users\Admin\Downloads\trufont\Lib\defconQt\scriptingWindow.py", line 40, in runScript
exec(code, global_vars)
File "<string>", line 8, in <module>
File "C:\Python34\lib\site-packages\defcon\objects\base.py", line 337, in getRepresentation
representation = factory["factory"](self, **kwargs)
File "C:\Users\Admin\Downloads\trufont\Lib\defconQt\representationFactories\openTypeFactory.py", line 5, in TTFontFactory
otf = compileOTF(font)
File "C:\Python34\lib\site-packages\ufo2ft-0.1-py3.4.egg\ufo2ft\__init__.py", line 29, in compileOTF
featureCompilerClass, kernWriter, markWriter)
File "C:\Python34\lib\site-packages\ufo2ft-0.1-py3.4.egg\ufo2ft\__init__.py", line 18, in _compile
featureCompiler.compile()
File "C:\Python34\lib\site-packages\ufo2ft-0.1-py3.4.egg\ufo2ft\makeotfParts.py", line 26, in compile
self.setupFile_features()
File "C:\Python34\lib\site-packages\ufo2ft-0.1-py3.4.egg\ufo2ft\makeotfParts.py", line 59, in setupFile_features
autoFeatures["kern"] = self.writeFeatures_kern()
File "C:\Python34\lib\site-packages\ufo2ft-0.1-py3.4.egg\ufo2ft\makeotfParts.py", line 82, in writeFeatures_kern
writer = self.kernWriter(self.font)
File "C:\Python34\lib\site-packages\ufo2ft-0.1-py3.4.egg\ufo2ft\kernFeatureWriter.py", line 30, in __init__
parser.parseFeatures(self, font.features.text)
File "C:\Python34\lib\site-packages\feaTools\parser.py", line 645, in parseFeatures
_parseUnknown(writer, text)
File "C:\Python34\lib\site-packages\feaTools\parser.py", line 300, in _parseUnknown
_parseUnknown(writer, precedingText)
File "C:\Python34\lib\site-packages\feaTools\parser.py", line 408, in _parseUnknown
text = _executeSimpleSlice(None, text, terminatorRE, writer)
File "C:\Python34\lib\site-packages\feaTools\parser.py", line 420, in _executeSimpleSlice
_parseUnknown(writer, precedingText)
File "C:\Python34\lib\site-packages\feaTools\parser.py", line 412, in _parseUnknown
raise FeaToolsParserSyntaxError("Invalid Syntax: %s" % text)
feaTools.parser.FeaToolsParserSyntaxError: 'Invalid Syntax: @group = [\\f \\i]'
Backslash-prefixed glyph name statements aren’t supported (they are in place to distinguish glyph names from identically-named keywords).
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
PKG-INFO - platform/external/fonttools - android Git repositories
important, we maintain an ordered list of glyph names in the font. Other Tools ... [feaLib] Add support for special-case contextual positioning formatting....
Read more >fonttools [python-library] - Occam :: Details
[merge] Support merging CFF tables (CID-keyed CFF is still not supported) (#2447). ... [feaLib] Support backslash-prefixed glyph names.
Read more >Source code for fontTools.feaLib.parser
If the iterable is left empty, no glyph name in glyph set checking takes place, ... kwargs.pop("glyphMap") if kwargs: raise TypeError( "unsupported keyword ......
Read more >Font Development Best Practices: Glyph Naming - GitHub Pages
Developers may choose to manage two sets of glyph names: working glyph ... Various font tools may have other restrictions but such are...
Read more >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
@miguelsousa btw, backslash-escaped CIDs (e.g.
\12345
) are already supported by feaLib parser.No, makeotf rejects
sub sub by lookup;
unless the glyph names are prefixed by a backslash. (Just checked).