Script glyphName to glyph (agrave to à)


Do you know a library/module which can convert glyphName to typeable glyph ?
(Of course if glyphName follow conventional name)

In what context would you like to convert the name?

For the inverse (Unicode to glyph name), Glyphs includes a System Service that shows up in the Services menu (in the menu bar, select the current app name → Services → Glyph Names to Unicodes and Unicodes to Glyph Names).

I wrote a script to extract all Kerning Pair from a font file using fontTool.

All these pairs are store in a dic like this :
AllPairs = {pairIndex = [rightGlyphName, leftGlyphName]}

I would like to check if pairs from this List are present in my dic.
That’s why I need to convert glyphName to typeable glyph

When working with fontTools, you can use the cmap table to convert between glyph names and Unicode code points.

cmap = font["cmap"].getBestCmap()
# cmap = {32: 'space', 33: 'exclam', 34: 'quotedbl', ...}

for codepoint, glyphname in cmap.items():
    character = chr(codepoint)
1 Like

You can use the system service that Glyphs provides: