forked from khaledhosny/ots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maxp] Attempt to improve fixup of bad 'maxp' version numbers.
If the version number is less than 0x00010000 (e.g. an example reported at mozilla/pdf.js#16839 apparently has 0x0100), it will be treated as version 0.5 and only the num_glyphs field is kept. However, this can prevent the font working on Windows, which apparently requires the full maxp table for truetype fonts. So if the version number was bad, but there is in fact enough data to parse as version 1.0, let's try correcting it to 1.0 rather than 0.5. Also make the max_zones fixup more general, as the example font from the above issue has max_zones=512(!). Correcting it to 2 should be harmless.
- Loading branch information
Showing
2 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters