written by Erwin Denissen, published November 21, 2022
I am sure you’ve been there, all side-bearings and kerning pairs look great, but while further looking at long lists of text to verify all kerning is looking great, you spot some more issues.
This time adjusting a single kern pair won’t do as the problem relates to more than a pair of characters. It just doesn’t look right with specific surrounding characters (L’Amour). There are several solutions to overcome collisions or incorrect spacing between a range of characters. One of them is contextual kerning. Regular kerning remains, so we go from there to add additional spacing.
We use the OpenType Designer to add both a pair adjustment (PairAdjTriplet) and a chained context positioning (TripletAdj) lookup.
Since the contextual kerning adds to the regular kerning, we add it to the existing kern feature, so people can decide to enable the whole set of kerning or not.
This is the complete feature code, containing the original kerning as well as the newly added contextual kerning: