Issue generating glyph copies dynamically


Strange one because on the surface it looks like everything is correct.

I’m duplicating new glyphs dynamically, the name and label colour the only changes at this point. From the glyphmap view one sees it successfully created the new glyphs from reference glyphs, assigned the correct name and colour. However when I double click on one — N.calt0 here — it opens up the the reference. N.calt0 opens as N, Aring.calt0 opens as Aring etc. So it’s not treated as a truly new glyph. I saved, reopened and same issue. Also it will not create the automatic CALT opentype when I try to update features so something definitely awry. Same in 2.5.2 and 2.4.2

Relevant code:


for gc in GlyphsToCalt:


for lc in gc:
	newGlyph = font.glyphs[lc].copy()
	newname = font.glyphs[gc[0]].name = newname + ".calt" + str(tcount)
	newGlyph.color = 8 #purple




Change the suffix name to .alt instead of .calt and see if that helps.


Same end result whether .CALT, .ALT or. ALTAVISTA.



It seems that you need to remove the unicode manually.

so do

newGlyph.unicode = None


Georg you beautiful big-brained beast of a man! Thank you!