Clusters don't include non-spacing marks and other diacritical marks with the base character.
A base character and a following mark character are not in the same cluster. This make repositioning operations incorrect/impossible. For example, PangoLayout will position marks half the
letter-spacing value too far to the right.
Consider 'x' followed by '◌̃ ' (combining tilde) followed by 'y'. Pango treats these as three separate clusters. In
- The 'x' is not shifted as it's the first character.
- The last glyph in the cluster (the 'x') width is increased by 1/2 the letter spacing.
- The '◌̃ ' is skipped as
is_cursor_positionfor it is false; it will be positioned 1/2 the letter spacing too far to the right since the extra advance due to letter spacing of the 'x' has already been applied.
- The 'y' is then shifted and it's width increased by 1/2 the letter spacing.
Step 2 should have been applied to the '◌̃ '.
Note: The default clustering in HarfBuzz does include marks with base characters.