Largest size before overflow?

Post Reply
User avatar
claegg
Posts: 26
Joined: 23 Apr 2021

Largest size before overflow?

Post by claegg »

I’m having issues with what I understand must be the final process of Kern On, the removal of ‘less important’ pairs in order to stay under the set kerning table size. However this means that something like the Wa-pair is not included every time in the font I’m working on. Kern On kerns it, but the pair sometimes exists in the generated font, sometimes not.

So (if I indeed got this right) what are your experiences with sizes of kerning tables? For interest I can say that the one if working on is three axis, two scripts, and ~1200 glyphs.
User avatar
Tim Ahrens
Site Admin
Posts: 404
Joined: 11 Jul 2019

Re: Largest size before overflow?

Post by Tim Ahrens »

Good question. I should really make this clearer in the dialogue but here are some thoughts.

We need to distinguish between webfonts and desktop fonts:
  • For webfonts, it’s up to the font maker to decide which amount of data we want to use for kerning. Careful: This is the uncompressed data size. In woff or woff2, you can expect the kerning to use roughly 1/3 of the raw size, as it’s compressed. I am planning to implement some sort of compressibility-enhancing finalization and let the user choose the approximate compressed kB for webfonts.
  • For desktop fonts, the crucial limit it 64 kB, otherwise you will get a subtable overflow. I don’t see any reason to use less than that because the file size of desktop fonts is completely irrelevant. I’ll probably give it a simple checkbox or radio button “generate kerning for desktop fonts” and not even let the user choose the data size.
    Note that if you use extension kerning you can use much more than 64 kB. Whether or not one should rely on extension kerning, and which environments support it, that’s something you need to decide, I haven’t done research on that subject recently.
So, short answer: Just use 64 kB and see how it goes. Once you generate webfonts you may need to re-kern-on the font (probably with a temporary file) with a data smaller size setting.
Eben Sorkin
Posts: 38
Joined: 27 Apr 2021

Re: Largest size before overflow?

Post by Eben Sorkin »

Would making the 'W+a' combination an exception guarantee that it is included?
User avatar
claegg
Posts: 26
Joined: 23 Apr 2021

Re: Largest size before overflow?

Post by claegg »

Good information Tim, thank you.

I can add that when I check the kerning in an HTML document, I can observe that the Safari browser is doing something to the kerning. Either quantising horizontal positions, ‘simplifying’ the kerning table, or outright dropping kerning values. In any event, what looks correct in FontGoggles can look way off in Safari. Other browsers fail in other ways.

Thank you for coming to my TED talk.
Post Reply