Open a glyphs file for scripting externally?

Hey,
I would like to extract what characters are defined in a glyphs file and read their advance widths, as well as kerning information.
Is there a way to open a glyphs file externally in python, like via some kind of ufo or similar library? Or is the glyphs file format a closed box in this regard - I seem to somehow have gotten the impression that a glyphs file is just an enhanced ufo directory?

Any pointers welcome :wink:

1 Like

There is a library from google: https://github.com/googlei18n/glyphsLib

1 Like

Perfect, that looks promising. Wonder how that could not have shown up in my searches… but alas, humans, knowledgable humans, ftw :slight_smile:

You also can load the .glyphs file like this:

from Foundation import NSDictionary

font = NSDictionary.dictionaryWithContentsOfFile_("Path/to/File.glyphs")

print font["glyphs"][20]