googlefonts / glyphsLib

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

Smart component incompatibility #907

Open simoncozens opened 1 year ago

simoncozens commented 1 year ago

887 turns out to have been a bad change; I'm getting files which built successfully before no longer building.

The idea was that if a smart component did not vary, it should be treated as a dumb component. The problem is that there are cases where a smart component can vary (have more than one smart-component-master defined) in some font masters, but only have one smart-component-master defined in other font masters. In this situation, the varying ones will get decomposed and the non-varying ones will not get decomposed, and the font will no longer compile because the number of paths/components will be different across masters.

One again this is complicated by the Original Sin, which is that we convert master-wise into individual UFOs and so do all our conversions through the lens of a single font master, while a proper test for whether the component varies or not needs to look across font masters.

simoncozens commented 1 year ago

(Noto Sans Oriya is an example font with this problem.)

anthrotype commented 1 year ago

revert?

simoncozens commented 1 year ago

I think it would be possible to run the test globally, I just don't have the headspace to do it right now. I'm not averse to reverting if you want to, but it's possible this issue only affects me, so I'm just going to pin to an earlier version of glyphsLib and move on for the time being. :-)