Access a glyph by its id

My font contains some duplicate glyphs using the same name. I’m willing to delete them using a script but the fact that I can only access the glyphs using their names and not their IDs mean that I can’t be sure that I’m deleting the right glyphs.

Is there a way to access specific glyphs other than using their name with f.glyphs[name] ?

You can just use numbers instead of the name.

Form the docu:

Collection of GSGlyph objects. Returns a list, but you may also call glyphs using index or glyph name or character as key.

1 Like

Thanks, this made it work!