You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying issue with the removed kerning-related code was that the call to FT_Get_Kerning() supplied arguments that were character codes rather than glyph indexes.
The observed impact of the issue was that the kerning value applied was intended for a different pair of characters than the pair displayed.
For certain font & character combinations the difference between the correct & incorrect kerning values was significant. e.g. for PetitLatin.ttf the kerning for t| ("tee pipe") was used to kern ck which resulted in character overlap.
TL;DR: The Bug & Cause
DynamicFont
kerning was removed by Fix font kerning #24777 due to issues with rendering some fonts as described in Weird kerning on labels #21965.The underlying issue with the removed kerning-related code was that the call to
FT_Get_Kerning()
supplied arguments that were character codes rather than glyph indexes.The observed impact of the issue was that the kerning value applied was intended for a different pair of characters than the pair displayed.
For certain font & character combinations the difference between the correct & incorrect kerning values was significant. e.g. for
PetitLatin.ttf
the kerning fort|
("tee pipe") was used to kernck
which resulted in character overlap.TL;DR: The Fix
Potential fix steps:
Revert a9b7843
Apply this patch:
This fix would both re-enable kerning[1] for
DynamicFont
and fix the previously observed kerning issue.[1] For fonts with
kern
tables but still not forGPOS
/kern
tables.TL;DR: Pretty pictures
Comparison screenshots based on
HEAD
3.2 branch yesterday:The bug (incorrect kerning applied):
Current situation (no kerning applied):
After fix applied (correct kerning applied):
Note the correct
c
+k
kerning and kerning that reduces the gap for theu
+c
&t
+|
character pairs.[WIP: Intend to add additional details & code references.]
The text was updated successfully, but these errors were encountered: