googlefonts / glyphsLib

A bridge from Glyphs source files (.glyphs) to UFOs
Apache License 2.0
178 stars 51 forks source link

KeyError: 'name' on designspace to glyphs #918

Open tetris-hermetris opened 1 year ago

tetris-hermetris commented 1 year ago
  File "/usr/local/lib/python3.10/site-packages/glyphsLib/builder/__init__.py", line 167, in to_glyphs
    return builder.font
  File "/usr/local/lib/python3.10/site-packages/glyphsLib/builder/builders.py", line 556, in font
    self.to_glyphs_glyph(glyph, layer, master)
  File "/usr/local/lib/python3.10/site-packages/glyphsLib/builder/glyph.py", line 478, in to_glyphs_glyph
    self.to_glyphs_hints(ufo_glyph, layer)
  File "/usr/local/lib/python3.10/site-packages/glyphsLib/builder/hints.py", line 51, in to_glyphs_hints
    setattr(hint, name, source[name])
KeyError: 'name'

Also if I add on 51 line in hints.py if name in source:, it converts, almost right, but with many component errors, such as

Glyph ushort-cy, layer Regular: The ComponentInfo at index 0 says the component at index 1 is named 'cyrbreve', but it is actually named 'breve-cy'. Skipping, component properties will be lost.

Also there are some issues in these glyphs in Glyphs, but ufos seems to be fine.

It seems to be related to renaming glyphs, but a full-text search of the project folder holding ufos cannot find anything like these names