Issue generating glyph copies dynamically


#1

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:

font.disableUpdateInterface()

for gc in GlyphsToCalt:

tcount=0

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

	tcount+=1

font.enableUpdateInterface()


#2

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


#3

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


#4


#5

It seems that you need to remove the unicode manually.

so do

newGlyph.unicode = None

#6

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