Closed Hoolean closed 1 year ago
(issue now filed for Noto Serif Tamil, where this causes some clashes)
Harry outlines a potential fix:
@Hoolean so it would be changing the logic in https://github.com/googlefonts/ufo2ft/blob/da917d/Lib/ufo2ft/featureWriters/kernFeatureWriter.py#L385-L395 to a split:
for pair in pairs: leftBases, leftMarks = split left hand side into bases/marks rightBases, rightMarks = split right hand side into bases/marks # Only matches pairs with no marks basePairs.append(Pair(leftBases, rightBases)) # no marks on left/right # Only matches pairs with at least one mark (no overlap with above) markPairs.append(Pair(leftMarks, rightMarks)) # marks on left/right markPairs.append(Pair(leftMarks, rightBases)) # marks on left markPairs.append(Pair(leftBases, rightMarks)) # marks on right
Problem
Scope
Although the issue was found in testing for the new kern splitter, both the old and new implementations are affected. In particular, incorrect kerning values were identified only in Noto Serif Tamil (with kerning-validator).
Reproducing
In Noto Tamil Serif
Minimal
(derived from Noto Serif Tami, which is under the OFL)
Kerning:
Groups:
Where /aa-tamil and /lu-tamil are bases, and /aulengthmark-tamil is a mark, /aa-tamil/lu-tamil is kerned to -55 instead of -20:
Workaround
Manually adjust your kerning to avoid mixing bases and marks in the same group.
Fix
Split bases and marks into separate groups in KernFeatureWriter (needs further thought).