Please sign in to comment.
Work around MS fonts with inaccurate kerning table metadata
It looks like some MS fonts report their kerning subtable lengths wrong. In one case, the length was reported to be some 19366, and yet the table also claimed to hold 14148 pairs (each pair consisting of 6 bytes). You do the math! We're going to assume that the microsoft fonts hold only a single kerning subtable, which occupies the entire length of the kerning table. Worst case, we lose any other subtables that the font contains, but it's better than reading a truncated kerning table. And what's more, it appears to work. So.
- Loading branch information...
Showing with 36 additions and 10 deletions.