Subject: | maxp version number parsed incorrectly |
Date: | Tue, 20 Jan 2009 09:52:02 +0000 |
To: | bug-Font-TTF [...] rt.cpan.org |
From: | Philip Taylor <pjt47 [...] cam.ac.uk> |
http://www.microsoft.com/typography/otspec/otff.htm says: "When a Fixed
number is used as a version, the upper 16 bits comprise a major version
number, and the lower 16 bits a minor. ... For example, the version
number of 'maxp' table version 0.5 is 0x00005000."
Font::TTF::Maxp does not take this into account. 0x00005000 is parsed as
0.3125 (i.e. 5/16), and then compared against 0.5, which is wrong and
breaks. The same issue applies when writing the version number out again.
I haven't checked if any other tables have fractional version numbers
that will break in the same way.
--
Philip Taylor
pjt47@cam.ac.uk