Kerning exception and class pair both applied in exported OTF (exception in separate lookup)

3.5.1 (3534), exporting a static OTF.

I have a kerning exception/seven.numr/fraction = −310. The right kerning group of seven.numr also has a class pair against fraction of −290. Edit view correctly shows −310. In the exported font the two values are added, so InDesign and HarfBuzz apply −600.

The compiled GPOS kern feature has two pair lookups, and both are registered for DFLT and latn:

Lookup Subtable Value
0 Format 1 (glyph pair) seven.numr fraction −310
1 Format 2 (class pair) @[seven.numr group] fraction −290

The exception and the class pair are in different lookups, so the exception doesn’t override the class pair and both apply.

The right group containing seven.numr mixes Common-script glyphs (numerators, superiors, asterisk, degree, registered, trademark) with Latin-script glyphs (ordfeminine, ordmasculine). Seems like Latin members cause the group’s class kerning to go into a separate script-specific lookup from the Common-script exception.

Could you send me that file?

1 Like

The problem is that the “zerosuperior” group contains some latin glyph (ordfeminine). That puts that group in the latin kern lookup. The “seven.numr” has no script and lands in the default lookup.
So you need to be careful when mixing scripts in kerning groups. So putting the three ordinal glyphs in its own kerning group, fixes this.

Thanks Georg, so what is the general rule about mixing scripts in kerning groups? I thought it was fine to mix for example Cyrillic and Latin glyphs in the same kerning group.

Latin, Cyrillic and Greek can be mixed. Basically everything else might cause problems.