Search for a glyph name in the font

When I have a glyph name and want to see if it actually exists in the font, what is the best way to search for it? Is there a list of glyph names somewhere? I was thinking of doing for loop or building a name list first, but that sounds inefficient.

I’d simply use the filter function at the bottom right corner of the window and see whether something comes up.

I think he meant by scripting. Try something like this:

It returns the glyph it exists in thisFont and None otherwise. So you can continue like this:
if thisGlyph:
print “yeah it exists!”

Yes, I was trying it in Python. Thanks!

Additional question: Is there predefined function to nudge-move a point? I looked up the GSNode help but couldn’t find anything.

And another question: How can I access a certain layer of a certain (unselected) glyph? I know the name of the glyph, and which master is currently active, but I cannot get to that layer.

I was trying like this, but it didn’t work.

thisFontMaster = thisFont.selectedFontMaster
targetGlyph = thisFont.glyphs[ “Adieresis” ]
targetLayer = targetGlyph.layers[ thisFontMaster ]

Or this, trying to access the layer by its name, which didn’t work either.

thisFontMaster = thisFont.selectedFontMaster
thisFontMasterName =
targetGlyph = thisFont.glyphs[ “Adieresis” ]
targetLayer = targetGlyph.layers[ thisFontMasterName ]

the key in the layers dict is the master ID:

targetLayer = targetGlyph.layers[ ]

Thanks, it’s working!
Now, what’s the best way to nudge-move an on-curve point? Do I need to do the math by myself or is there something that does it for me?

This is currently not possible. I need to refactor a bit to make that accessible.