glyphOrder (custom parameter)

Hi, I’ve set the font’s glyphOrder via scripting:
font.customParameters[‘glyphOrder’] = [‘a’,‘b’, ‘c’… etc]
– I can see it set in the info window but I can’t see the empty character slots in the Font, should I do something else?
– I guess if I set it in the ‘font’ info panel I won’t need to set it again in masters and instances, is this correct?

It seems to me what you want is a list filter. Slots in font view are only shown when the actual glyphs have been created.

I added my custom glyphOrder and created the new glyphs with

newGlyph = GSGlyph(gname)

What I don’t get now is the Unicode for the new glyphs added this way.
Is there a way of doing this? (if the names are “friendly/nice” names it would be good to have the unicode added automatically as when you do it by hand through the menu), maybe I’m doing it wrong?

That’s what happens unless you have custom naming on in Font Info > Other Settings.

I don’t have that setting on, and the new glyphs generated the way I wrote don’t get the unicode… :-/

Which build number?

latest, 1034

I see, add this line:


Updating the glyphInfo worked, thanks.
The only issue I have now is that I don’t get the unicode in some glyphs, my guess is that in Glyphs they’re not named that way (or they’re not in GlyphData.xml), so my (hopefully last ; ) question is if I can get the Glyphs ‘nice name’ and ‘production name’ given a unicode (hex and or dec).
glyph.niceName(2196) returns -> northWestArrow, uni2196, (and alternate names maybe)

[FORGET the previous paragraph, I’ll parse the GlyphData.xml file, it’s all there]

(and another related question, can I change the background font in gray –in the font window?)

No need to parse the GlyphData.xml file. For example, take a look at:



glyphInfo = Glyphs.glyphInfoForUnicode('2196')
# == u'northWestArrow'
# glyphInfo.unicode == u'2196'