Converting a UFO’s font.lib: Can I store arbitrary information in a Glyphs source (e.g. notes, extension preferences, etc)

I may have found the answer to my question already, but it was a little harder than expected, so I figured I should post it here to both verify that I’m understanding correctly and also to leave it here if someone else searches in the same way.

Question: what is the equivalent of a UFO’s font.lib in a Glyphs source?

I am trying to convert a UFO-based project to a Glyphs-based project.

In my current (UFO-based) build, I generate semi-random “bounce” values for glyphs, then generate new UFO fonts using these bounce values to shift glyphs on the Y axis. I then write those bounce values to the font.libs of the initial UFOs, so I can repeat the same build by looking up values on subsequent runs.

I am hoping to shift the project source to Glyphs, but I will need to adapt this bounce font.lib process to Glyphs if I want to actually move the project.

Answer?

The userData dictionary seems to be where this info is stored. At least, that is where com.arrowtype.glyphBounces is located after a conversion using ufo2glyphs from glyphsLib.

Question: can I write to userData with Python, using glyphsLib?

I need to be able to record info to the glyphs source without opening GlyphsApp itself. I think I can do this using glyphsLib, but I am still figuring that out.

I’ll try to update when I find out!

UPDATE:

Hmm, I’m currently blocked by Error when trying to open font: "openstep_plist.parser.ParseError: Unexpected EOF while parsing plist" · Issue #795 · googlefonts/glyphsLib · GitHub.

Is there a good way to validate the code in a Glyphs file (in particular, and unexpected end of file), to figure out what might be tripping up glyphsLib?

Can you send me the .glyphs file?

Sent!