Building version 1.001 fonts in glyphs results in head table fontRevision "1.00099"

I’m in Glyphs 3.3.1 (3342), and I’ve experienced this several times, for different fonts, in several recent versions of Glyphs.

If I set the Font Info Version to 1.001, then build with Glyphs, the resulting fonts get a head table with <fontRevision value="1.00099"/>.

The values are correctly set to 1.001 in the name table, for Name IDs 3 & 5.

In Glyphs, setting the Font Info Version to 1.002 results in an accurate head table version.

Am I doing something wrong? Is TTX somehow misinterpreting the value? Is this some weird Python number-handling thing?

Thanks for any insights!

I would guess there’s a problem with having a floating-point number represent 1.001 exactly. The language Ruby seems to have this exact issue, for example: 1.001 + 0.001 = 1.0019999999999998 in that. Oh, and C++ too.

Chances are this exact same thing is going on here: the font version is stored as a floating-point number? If I’m right, then there’s nothing you can do except change the version number to almost anything else than 1.001.

The fontRevision is stored as a “32-bit signed fixed-point number (16.16)” (google it, this is a lot of fun). And I had another look at my code and it turns out, there was a rounding problem like this already. I fixed it. Thanks for bringing this up.