googlefonts / glyphsLib

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

Can't export with smart component #927

Open RosaWagner opened 1 year ago

RosaWagner commented 1 year ago

repo: https://github.com/Alexandre-Bassi/ChaumontScript

ValueError: Could not generate smart component model for _smart_transvers used in <GSLayer "Italic" (Eth)>.
Locations were:
  Italic = {'Short': 0.0, 'Width': 0.0}
  Long = {'Short': 0.0, 'Width': 1.0}
  Short = {'Short': 1.0, 'Width': 0.0}
  Short = {'Short': 1.0, 'Width': 0.0}
  Long = {'Short': 0.0, 'Width': 1.0}
   = {'Short': 0.0, 'Width': 0.0}
justvanrossum commented 1 year ago

I'm seeing this also in another project. I wonder if Glyphs perhaps ignores layers with duplicate locations?

Perhaps glyphsLib is correct in choking on this ambiguous data, though. But if Glyphs itself can resolve it, then glyphsLib should perhaps also do that.

anthrotype commented 1 year ago

if Glyphs itself can resolve it, then glyphsLib should perhaps also do that.

the question is how does Glyphs.app resolve these duplicate locations, if at all?

schriftgestalt commented 1 year ago

Glyphs just picks the first layer it finds for each location.

But the setup with a "Width" and "Short" axis doesn’t make much sense for me.

RosaWagner commented 1 year ago

@schriftgestalt what would make sense to you so we can fix and export?