Bug 240509 - Incorrect line breaking for Javanese
Summary: Incorrect line breaking for Javanese
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-16 23:27 PDT by Norbert Lindenberg
Modified: 2022-05-23 23:28 PDT (History)
5 users (show)

See Also:


Attachments
Screenshot 1 (63.13 KB, image/png)
2022-05-16 23:28 PDT, Norbert Lindenberg
no flags Details
Screenshot 2 (61.24 KB, image/png)
2022-05-16 23:29 PDT, Norbert Lindenberg
no flags Details
Screenshot 3 (66.08 KB, image/png)
2022-05-16 23:30 PDT, Norbert Lindenberg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert Lindenberg 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: ꦧ꧀, ꦤ꧀ꦤꦺ, ꦤ꧀.
Comment 1 Norbert Lindenberg 2022-05-16 23:28:29 PDT
Created attachment 459483 [details]
Screenshot 1
Comment 2 Norbert Lindenberg 2022-05-16 23:29:29 PDT
Created attachment 459484 [details]
Screenshot 2
Comment 3 Norbert Lindenberg 2022-05-16 23:30:13 PDT
Created attachment 459485 [details]
Screenshot 3
Comment 4 Radar WebKit Bug Importer 2022-05-23 23:28:13 PDT
<rdar://problem/93810908>