RESOLVED FIXED240509
Incorrect line breaking for Javanese
https://bugs.webkit.org/show_bug.cgi?id=240509
Summary Incorrect line breaking for Javanese
Norbert Lindenberg
Reported 2022-05-16 23:27:49 PDT
https://lindenbergsoftware.com/apple/safari/javanese-lb.html contains a <p> element with style="overflow-wrap: break-word". According to https://drafts.csswg.org/css-text/#overflow-wrap-property, this enables line breaks "at an arbitrary point if there are no otherwise-acceptable break points in the line", under the constraint that "grapheme clusters must stay together as one unit". (With https://drafts.csswg.org/css-text/#character makes clear that "A UA must use the extended grapheme cluster (not legacy grapheme cluster), as defined in UAX29, as the basis for its typographic character unit" but may tailor it where necessary to improve behavior. The actual line breaking for Javanese with this setting shows several issues, that can be seen by resizing the window and thus the paragraph. Screenshot 1 shows that a dependent vowel, U+A9B4 ◌ꦴ, is separated from the other characters of the extended grapheme cluster ꦪꦺꦴ it belongs to. Screenshot 2 shows that an extended grapheme cluster ꦪꦺꦴ is not separated from the preceding extended grapheme cluster ꦤ꧀ꦲꦁ even though it clearly does not fit on the line. Screenshot 3 shows that similarly several other extended grapheme clusters are allowed to stay on lines that they don't fit into: ꦧ꧀, ꦤ꧀ꦤꦺ, ꦤ꧀.
Attachments
Screenshot 1 (63.13 KB, image/png)
2022-05-16 23:28 PDT, Norbert Lindenberg
no flags
Screenshot 2 (61.24 KB, image/png)
2022-05-16 23:29 PDT, Norbert Lindenberg
no flags
Screenshot 3 (66.08 KB, image/png)
2022-05-16 23:30 PDT, Norbert Lindenberg
no flags
Norbert Lindenberg
Comment 1 2022-05-16 23:28:29 PDT
Created attachment 459483 [details] Screenshot 1
Norbert Lindenberg
Comment 2 2022-05-16 23:29:29 PDT
Created attachment 459484 [details] Screenshot 2
Norbert Lindenberg
Comment 3 2022-05-16 23:30:13 PDT
Created attachment 459485 [details] Screenshot 3
Radar WebKit Bug Importer
Comment 4 2022-05-23 23:28:13 PDT
Norbert Lindenberg
Comment 5 2025-01-31 14:21:14 PST
These line breaking problems are no longer reproducible in Safari 18.3 on macOS 14.7.3. I assume that’s because WebKit relies on ICU for line breaking: The Unicode Line Breaking Algorithm was updated in Unicode 15.1 to support line breaking at orthographic syllable boundaries, and ICU implemented that change. See: – Proposal: https://www.unicode.org/L2/L2022/22080r2-line-break-ortho-bnd.pdf – UAX 14 in Unicode 5.1: https://www.unicode.org/reports/tr14/tr14-51.html – ICU 74 release notes: https://icu.unicode.org/download/74
Note You need to log in before you can comment on or make changes to this bug.