Turning layers into seperate glyphs?

Is there a way to convince Glyphs to turn certain glyph layers into separate glyphs à la COLR layers?

I’m thinking I can probably solve my keeping references to glyph names issue by turning the referenced glyphs into layers of the base glyph instead of being separate glyphs, but for this to work I’ll need the layers to be exported as separate glyphs in the binary font so I can access them later.

There is direct API for this. But it might be possible to use the “GSPrepareLayerCallback”.

I wonder what is easier for the user: Extra glyphs or all options in one glyph in multiple layers.

This callback does not seem to be documented. I tried the following but nothing was printed when I exported the font.

def callback(*args):
	print(args)

Glyphs.addCallback(callback, "GSPrepareLayerCallback")

Good point, I’m not sure actually. For me using layers seems less cluttered.

The object that is registering the callback needs to implement processLayer:extraHandles:error:

1 Like