What is .glyphs file format?

We need to parse the file .glifs (or another who contains the names of characters) to automate creation iconic font. Someone has this experience?

Glyphs file is actually a text file (or can be opened and modified with a text editor), if that’s what you’re asking.

There is actual documentation for it in the works. But for the time being, I simply recommend opening it in a text editor, I think it is pretty self-explanatory for the largest part.

It’s self-explanatory, really, and this just made me curious why Glyphs use its own ‘readable’ font format instead of UFO?

One reason might be that a glyphsfile can contain multiple master, ufo can not.

And .ufo file are two to three times bigger. But jakob is right, the main reason is the missing Multiple Master support.

Oh, OK, I wasn’t aware of that - thanks!

So, anyone has tried to deserialize the .glyphs file?

What do you mean by that?
Glyphs files are text files, formatted based on the plist format. There is a spec: GlyphsSDK/GlyphsFileFormatv3.md at Glyphs3 · schriftgestalt/GlyphsSDK · GitHub

And there is glyphsLib, an python library that reads and writes .glyphs files.

What do the node type codes, c, l, o, q mean? I didn’t see that in the file you posted above (from Dec, '21)

Update:
OK, from looking at some source code for that python parser, I think it’s

C = CURVE
Q = QCURVE
L = LINE
O = OFFCURVE

S (if added) = SMOOTH, otherwise the node is SHARP.

I found more information here: Glyph Interchange Format
describing the meaning of those point types.

While I understand the risk of commenting on a very old thread, this seems to be the most appropriate conversation:

  • is there a .glyphs syntax highlighting package (for SublimeText, for example?)
  • alternatively, is there a way to add whitespace to a .glyphs file for creating some kind of semantic hierarchy (with collapsible elements – similar to XML, for example?)

Thanks!

What do you aim to achieve with syntax highlighting? What do you need it for?

I have a Glyphs syntax file and a settings file for Sublime Text in my old ST repo. It also has support for Go To (cmd-R) to jump to glyph names and unicode values.

It should still work, but it is around 5 years old, and I use VSCode nowadays 


Glyphs uses the old style property list. I (still) use textmate and it has pretty good support for it. Including code folding. And you can use Text > Indent Selection.

There is also this VSCode Plugin, which does not too much other than highlighting keys and values. But that is already of some help.

Making all objects available in the Outline of VSCode would be a nice addition to it.

Thanks all for the responses. TextMate with plist (old-style) works. Actually toggling the code fold is slow, but that might have to do with the size of my file.

For the “why”: code folding comes in handy in a file with nearly a million lines – I was working on finding the causes for tracebacks in glyphs2ufo conversion:

@jkutilek – that link does not seem to work for me. Is this a private repo?
Or is it GitHub - jenskutilek/TextMate-Bundles: Themes and syntaxes for the Sublime Text and TextMate editor with a focus on font development ?

Never got used to VSCode, but maybe I should give it another try.

Thanks again!

Ah, sorry Frank, that repo is indeed private. Here are the files relevant for Glyphs, they go into ~/Library/Application Support/Sublime Text 3/Packages/User:

GlyphsST.zip (1.2 KB)

1 Like