[Webkit-unassigned] [Bug 236477] letter-spacing is totally broken in Burmese

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 10 23:29:20 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236477

--- Comment #3 from Myles C. Maxfield <mmaxfield at apple.com> ---
It looks like the correct iterator to use is kCFStringCursorMovementCluster.

This is turning out to be harder than I thought it would be. Because Burmese text is so complicated, it looks like I can't:

- add space to the right side of a glyph if the character just after the character the glyph corresponds to is a boundary, because of the string "ဂြို". This string has 4 code points, but no glyph corresponds to the last code point - the last glyph corresponds to the second-to-last and last code points together.
- add space to the left side of a glyph if the character the glyph corresponds to is a boundary, because of the same string "ဂြို". Here, the leftmost character corresponds to string index 1 and then the next glyph corresponds to string index 0. Therefore, if we did this, we'd inject letter-spacing in the middle of the cluster.

I think the solution is to keep track of cluster boundaries as we iterate across glyphs, and insert space to the right of a glyph if the current glyph and the next glyph belong to different clusters.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220211/9aae48c0/attachment.htm>


More information about the webkit-unassigned mailing list