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
* fix(textkit): advanceWidthBetween regression with glyphIndices
Adapt advanceWidthBetween to new glyphIndexAt semantics from #3358.
The refactored glyphIndexAt uses reverse-loop search instead of direct
array lookup, requiring callers to use `end - 1` (as slice.ts was updated).
advanceWidthBetween was missed, causing width=0 for characters at run
boundaries when scriptItemizer splits CJK text by script (Han/Hiragana/
Katakana). This broke text wrapping for any multi-script text.
* add changeset
* fix(textkit): handle past-the-end index in glyphIndexAt
glyphIndexAt now returns glyphIndices.length when the string index is
beyond all glyph mappings, restoring the old fallback behavior.
This removes the need for callers to pass end - 1 as a workaround.
advanceWidthBetween is reverted to its original calling convention.
0 commit comments