glyphsLib: layer.name causes intermediate sources with duplicate locations
The layer.name
should not be used for anything. Only when opening v2 files to convert to layer.attributes
.
In Glyphs 3, layer.name
is generated from the attributes but is only used for UI purposes.
I just found a problem where two glyphs with a brace layer for the same position would generate duplicate SourceDescriptor
s because of different names.
WARNING:glyphsLib.builder.sources:DesignSpace sources contain duplicate locations; varLib expects each master to define a unique location. Make sure that you used consistent 'brace layer' names in all the glyph layers that share the same location.
['{110, 0}', '25. May 22, 21:39'] => {'Weight': 110, 'Ascender': 0}
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (10 by maintainers)
Commits related to this issue
- generate layer.name from intermediate layer coordinates Fixes https://github.com/googlefonts/glyphsLib/issues/851 — committed to googlefonts/glyphsLib by anthrotype a year ago
- generate layer.name from intermediate layer coordinates Fixes https://github.com/googlefonts/glyphsLib/issues/851 — committed to googlefonts/glyphsLib by anthrotype a year ago
- designspace_gen_test: confirm source ufo contains the named intermediate layer! Trying to debug https://github.com/googlefonts/glyphsLib/issues/925 Follow-up from #928 and #851.. apparently I made i... — committed to googlefonts/glyphsLib by anthrotype a year ago
Looks like there is
layer.nameUI()
that returns the actual name (though the naming is confusing, shouldn’t.name
return the actual name andnameUI()
do the other way around? More confusingly, if you set.name
,.nameUI()
returns the new name while.name
still gives the UI name).