googlefonts / glyphsLib

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

Duplicate unicodes for color layers #943

Closed yanone closed 1 year ago

yanone commented 1 year ago

Generating a color font with fontmake currently leads to all layers receiving the base glyph’s unicode value which prevents the font from generating.

Current code:

ufo_glyph.unicodes = [int(uval, 16) for uval in glyph.unicodes]

This works:

ufo_glyph.unicodes = [int(uval, 16) for uval in glyph.unicodes] if not ".color" in glyph.name else []

My workaround is probably too simplistic as there may be other reasons that a layer is a secondary one and mustn’t get a unicode. What are other criteria?

As usual, I’m happy to prepare a PR.

khaledhosny commented 1 year ago

Duplicate of #937