f.info.openTypeOS2WinDescent caveat

Skip to first unread message

Type Invaders | Paul van der Laan

Oct 3, 2013, 6:03:54 AM10/3/13
to rob...@googlegroups.com
Dear RoboFab developers,

Here's an interesting catch 22 with regards to how the openTypeOS2WinDescent value is being handled.

According to the official spec this value needs to be a positive value. FontLab sadly got it wrong in their implementation, and defines it as a negative value. RoboFab in FontLab also returns it as a negative value.

Problem now is when I have a UFO with a correctly defined (positive) value for openTypeOS2WinDescent, I am not able to import it in FL with UFO Central because the following error is being raised:
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/RoboFab/robofab/objects/objectsFL.py", line 2985, in _set_openTypeOS2WinDescent
raise ValueError("FontLab can only handle negative values for openTypeOS2WinDescent.")
ValueError: FontLab can only handle negative values for openTypeOS2WinDescent.

Interestingly this error is not being raised when I manually run "f.info.openTypeOS2WinDescent = -240" in FontLab.

I am a little confused whether this is specifically a RoboFab issue, or one in UFO Central. But a fix for this issue would be very welcome.



Tal Leming

Oct 3, 2013, 10:02:32 AM10/3/13
to rob...@googlegroups.com
Hi Paul,

The OpenType OS/2 spec has it defined as an unsigned (and therefore positive) integer. The UFO spec follows the OTF spec, so the value in the UFO should be positive. For UFO 1 and UFO 2, RoboFab tries to be lenient since there are a lot of UFOs with negative numbers out there. The master version of RoboFab on GitHub catches negative numbers, warns and converts the value to a positive number:


It's doing the right thing but the warning message should be more clear about what is going on and why.

As for UFO Central, it uses RoboFab's import so there shouldn't be any difference:


I don't have a working copy of Mac FontLab, so I can't test this. Could you check to make sure that your copy of RoboFab and UFO Central are up to date?

> --
> --
> You received this message because you are subscribed to the Google Groups "RoboFab" group.
> To post to this group, send email to rob...@googlegroups.com
> To unsubscribe from this group, send email to robofab-u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/robofab?hl=en
> Messages from newly joined members are subject to moderation.
> Download RoboFab and documentation at http://robofab.com
> ---
> You received this message because you are subscribed to the Google Groups "RoboFab" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to robofab+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Type Invaders | Paul van der Laan

Oct 3, 2013, 10:23:50 AM10/3/13
to rob...@googlegroups.com
Hi Tal,

Thanks very much for the reply. I always try to be as up to date as possible with my installations, but I will certainly try the Github version and hopefully this has been addressed already.

I'm still puzzled why this error is only raised when using UFO Central, and not when I set this value manually. I will let you know as soon as I have discovered more.


Reply all
Reply to author
0 new messages