How to pre-generate or batch generate multiple custom glyphs

Hi,

I’m using Glyphs 2.6.6. and need to add a multiple (hundreds) glyphs at once.

I made an XLS table with unicode values and names of the glyphs, but can’t figure out how to add new glyphs with both, it’s unicode values and coresponing names at the same time. Is there a way how to do this via Glyph > Add Glyphs… ? Here’s an example, but it generates only the glyphs without the names: Creating an Icon Webfont | Glyphs

Do I have to use some specific format or separator?

Thank you

Jan

You can use a script like the following:

entries = {
	"someglyph1": "E001",
	"someglyph2": "E002",
	"someglyph3": "E003",
	"someglyph4": "E004",
	"someglyph5": "E005",
}
for name in entries:
	glyph = GSGlyph(name)
	glyph.unicode = entries[name]
	Font.glyphs.append(glyph)

Replace the glyph names and Unicode values in the entries variable and run the code in the Macro Panel.


In case you want to reuse this set of glyph names and Unicode values, look into defining a custom Glyph Data database.

Wow, it is working! That’s fantastic, thank you Florian!