kerning across codepages

cerulean's picture

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 Kutilek's picture

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.

twardoch's picture

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.

Best,
Adam

Syndicate content Syndicate content