googlefonts / googlefonts/glyphsLib
ufo2glyphs unhandled AttributeError: 'MarkClassName' object has no attribute 'glyphclass'
- Dominant language
- Python
- Stars
- 201
- Forks
- 56
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
When running ufo2glyphs I'm seeing the following traceback:
```Traceback (most recent call last):
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/features.py", line 595, in _process_glyph_class_definition
if st.glyphs.original:
AttributeError: 'MarkClassName' object has no attribute 'original'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/ufo2glyphs", line 11, in
load_entry_point('glyphsLib', 'console_scripts', 'ufo2glyphs')()
File "/home/david/src/glyphsLib/Lib/glyphsLib/cli.py", line 293, in _ufo2glyphs_entry_point
return main(args)
File "/home/david/src/glyphsLib/Lib/glyphsLib/cli.py", line 189, in main
return options.func(options)
File "/home/david/src/glyphsLib/Lib/glyphsLib/cli.py", line 266, in ufo2glyphs
font = glyphsLib.to_glyphs(
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/__init__.py", line 145, in to_glyphs
return builder.font
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/builders.py", line 749, in font
self.to_glyphs_features()
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/features.py", line 298, in to_glyphs_features
_to_glyphs_features(
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/features.py", line 317, in _to_glyphs_features
processor.to_glyphs(font)
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/features.py", line 496, in to_glyphs
self._process_file()
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/features.py", line 508, in _process_file
or self._process_glyph_class_definition()
File "/home/david/src/glyphsLib/Lib/glyphsLib/builder/features.py", line 612, in _process_glyph_class_definition
elements.append("@" + st.glyphs.glyphclass.name)
AttributeError: 'MarkClassName' object has no attribute 'glyphclass'
```
This can be reproduced by running ufo2glyphs against [DoulosSIL-Regular.ufo](https://github.com/silnrsi/font-doulos/tree/master/source/DoulosSIL-Regular.ufo)
It seems to be triggered by uses a mark class as a glyph class (line 2393: `@c_u_diacs = @_U;` in features.fea.
We believe this is valid fea code - and it is handled OK by the fonttools fea compiler.
Contributor guide
Assessment
This issue has not been assessed yet.