UFO export to Robofont ValueError

When exporting a UFO file from Glyphs, the exported fontinfo.plist has a line of code similar to this:

<key>openTypeHeadCreated</key>
<string>2023/05/18 3:34:25 PM</string>

I have a bit of a weird workflow at the moment and need to switch between Glyphs and Robofont, which is why I’m working with UFOs in the first place. Unfortunately, Robofont cannot read this code and returns:

Traceback (most recent call last):
  File "lib/doodleDocument.pyc", line 107, in _loadFont
  File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/font.py", line 425, in _get_info
  File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/fontTools/ufoLib/__init__.py", line 575, in readInfo
  File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/info.py", line 38, in setter
ValueError: Invalid value ('2023/05/18 3:34:25 PM') for attribute openTypeHeadCreated.

When removing these lines manually from the fontinfo.plist everything works as expected. Is this a bug and is it possible to fix this?

I’ve done some reading about the OpenType head Table Fields here: fontinfo.plist and it states that the time should be in 24h format. I edited it from 3:34:25 PM to 15:34:25 and then tried to open it in Robofont which worked!

I fixed it. Thanks for reporting.
The problem was that the date string format depended on the user settings. And mine matched the expectations of RF and you happened to have a different setting.

1 Like

Hey @GeorgSeifert thanks for fixing the issue so swiftly and releasing version 3.2!

I noticed a bug now in the new version related to this. When I create a new font file and set the creation date (12h format) to AM, it gets stored e.g. as date = "2023-05-23 09:21:54 +0000". So far so good! However, when I want to open an old file that was created at an AM time, Glyphs returns the error Unknown token “AM” on line: 15 and on line 15 it says date = "2022-02-11 1:07:59 AM +0000". Removing the AM from the code fixes it.

I know this is probably an edge case, but maybe still good to be aware of it. Sorry if I should have opened another topic regarding this.

You mean .glyphs files? Can you send me that file?