Open ctrlcctrlv opened 2 years ago
Try with --minimal
to skip background layers. Glyphs allow for components to non-existing glyphs and is a bit tolerant about it. glyphsLib
is more strict (although one can make a case for skipping such components by default or under an option).
I know this is archaeologically old, but: today I went looking for why background layers are decomposed, and there's a good reason for it (since a component reference in a Glyphs background layer points to the a glyph in the default layer but component reference in a UFO background layer points to another glyph in the background layer, converting Glyphs->UFO would require creating additional background layers to be generated for referred glyphs, so we just decompose everything to make it easier.)
However when that was introduced in #610, it came with a LayerDecomposingPen
which did just warn when non-existent glyphs were referred to as components; but this was quickly changed to use a standard pen, which errors when the referred glyph doesn't exist.
if we still want to just warn and drop missing components in backgrounds, we can easily make our own subclass:
class LayerDecomposingPen(DecomposingRecordingPen):
skipMissingComponents = False
FYI, in a yet unreleased fonttools, all the decomposing pens come with an optional skipMissingComponents
parameter to control this at the instance level (as opposed to subclassing and setting a class attribute like in the above example).
There will also be a DecomposingRecordingPointPen (point pen equivalent to the DecomposingRecordingPen used here)
https://github.com/fonttools/fonttools/pull/3460
I was very curious what @clauseggers's new Playfair font looked like (the non Display version), and upon seeing he uploaded a few .glyphs files three days ago, endeavored to compile them. However, glyphsLib crashed:
I have no Macbook and no Glyphsapp, so this was my only way to see the font. I commented out the raise in components.py:135 and got a font from
Playfair-2-Roman.glyphs
:I suggest demoting this from a hard error to a warning.