Example of TTF/OTF font with multiple KERN subtables?

altsan's picture

I'm trying to write a program which has to parse a TTF/OTF file's KERN table, search through the subtables until it finds a format 0 subtable, and extract the kerning pairs.

It seems to work OK as long as the format 0 subtable is the first and only one (which seems to be the case for all the fonts I have). However, I have doubts about the reliability of my logic to skip past multiple subtables of differing types. I definitely need to test this functionality.

Unfortunately, I don't seem to have any fonts which have multiple kerning subtables. Does anyone know where I can find one? Specifically, a TrueType (or OpenType/TT) font which contains multiple subtables in the KERN directory, (and preferably where the very first subtable is not format 0).

JanekZ's picture

Brill
EBGaramond (Opensource, OFL; you can delete unnecessary subtables)

altsan's picture

Thanks. I've examined both Brill and EBGaramond; neither one appears to have a KERN table. Indeed, Brill appears to be exclusively an OpenType/PS (CFF) font, which means by definition it can't have one. I assume they both define kerning via GPOS instead...

JanekZ's picture

Sorry, you are right.
I tried to generate ttf font with old KERN, but both FontForge and FontLab did only one subtable...

Grzegorz Rolek's picture

I’ve found two within system-provided fonts in OS X Lion: Geeza Pro (all subtables format 1), and Skia (all subtables format 3). Those are old fonts and should be present in previous OS X releases as well.

altsan's picture

Thanks. I suspect most such fonts are indeed going to be found on Apple platforms. I'll see if I can track some down.

In the meantime, however, I think I've managed to improve my logic so it should at least fail gracefully if it can't parse the tables as expected.

Syndicate content Syndicate content