Closed anthrotype closed 3 months ago
I used to insert these to ensure I always get the same number of lookups across masters (since the kern feature writer can produce a different number of lookups when multiple scripts or directions are involved) to keep varLib.merger from failing. This wouldn’t matter when we are directly building variable feature, right?
I used to insert these to ensure I always get the same number of lookups across masters
are you sure that works for class-class 0-valued kern pairs? they are currently dropped, see getKerningPairs
method below (from main
):
This wouldn’t matter when we are directly building variable feature, right?
yeah, that should not be a problem in this case
I used to insert these to ensure I always get the same number of lookups across masters
are you sure that works for class-class 0-valued kern pairs? they are currently dropped, see
getKerningPairs
method below (frommain
):
That as a few years ago, so my memory is fuzzy.
this PR is basically doing the same thing that getKerningPairs does, but for getVariableKerningPairs as well
We already prune class-class kerning pairs whose value is 0 when building individual per-master GPOS tables (to be merged with varLib). It makes sense to also do that when we build a single variable GPOS table. This is safe to do because we always place the class-class kerning as the last (after glyph-glyph kerns), so these don't override anything else that may follow and 0 is the default anyway, so they are essentially no-op.