kerning across codepages

Primary tabs

3 posts / 0 new
Last post
Kevin Pease's picture
Joined: 19 Oct 2003 - 5:03pm
kerning across codepages

This may be something I should ultimately just let go of and hope nobody notices the result, but I'm noticing that when I generate an OTF from FontLab, and test it in OpenOffice, kerning is only applied to the glyphs in Latin-1. Though they are in the same class, Á kerns but Ā doesn't. Is this a limitation I should just expect, or is it an aspect of how I've generated my font that I can correct somehow?

Jens Kutílek's picture
Joined: 12 Sep 2007 - 7:55am

OpenType class kerning isn't supported very well by Office applications in general. But usually kerning is turned off by default in Office applications, so it’s quite unlikely anyone will notice. I'd just leave it as it is.

Another option would be to expand the class kerning and write a »plain« kern table into the font. But expanding the class kerning may result in a lot of kern pairs, and the limit that can be used is somewhere over 10000, and you lose all the advantages of kerning classes.

Adam Twardoch's picture
Joined: 3 Dec 2002 - 7:36pm

As OTF fonts do not normally contain a "kern" table, only GPOS kerning, the Adobe font driver in Windows (part of Windows GDI) and ATM on Mac OS 9 expands the GPOS kerning into a flat table and subsets it for Latin-1. Applications that do not process OpenType Layout features use that kerning.

It's very likely that on Linux, FreeType works similarly.

OpenOffice does not, AFAIK, process OpenType Layout features in fonts.

As Jens points out, one way to work around the problem is to generate both GPOS kerning and the old-style plain "kern" table kerning (this is controlled in Preferences / Generating OpenType & TrueType / Kerning). The maximum number of "kern" table kerning pairs is 10920, and this is the maximum limit you should enter in "Limit total number..." there.

Technical background: Each pair in the "kern" table takes 6 bytes, there is a 14-byte header, and the maximum size of a subtable is 64K bytes, so (65536-14)/6 gives you 10920. Most font engines only support a "kern" table with one subtable, so there's the limit.

This might help, provided that the font driver actually looks for the "kern" table in OTF fonts, which may or may not be true, depending on the operating system you're using OpenOffice in.