Bug 213772

Summary: The preferred logical width of a text with line-break:anywhere doesn't take kerning into account
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, mmaxfield, zalan
Priority: P2 Keywords: BrowserCompat
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case
none
[screenshot] AppleWin port
none
[Screenshot] Safari TP 109
none
Safari vs Others none

Description Fujii Hironori 2020-06-29 21:23:39 PDT
The preferred logical width of a text with line-break:anywhere doesn't take kerning into account
Comment 1 Fujii Hironori 2020-06-29 21:26:18 PDT
Created attachment 403171 [details]
test case

The first text has text-rendering:optimizeSpeed, and is rendered without kerning.
The second text has text-rendering:optimizeLegibility and line-break:anywhere, is rendered without kerning.
However, the second text computed its width without kerning and has the extra space.
Comment 2 Fujii Hironori 2020-06-29 21:41:33 PDT
Created attachment 403172 [details]
[screenshot] AppleWin port
Comment 3 Fujii Hironori 2020-06-30 21:47:58 PDT
Created attachment 403262 [details]
[Screenshot] Safari TP 109
Comment 4 Fujii Hironori 2020-10-01 14:11:30 PDT
(In reply to zalan from bug #217136 comment #3)
> In LFC the preferred width computation and the actual layout share the same
> codepath with different constrains, so I'd say yes.
Comment 5 Ahmad Saleem 2023-10-07 15:12:00 PDT
Chrome Canary 119 and Firefox Nightly 120 match each other in above test case while Safari Technology Preview 180 does not.

AppleWin port is gone though it still seems to be an issue.

@Alan - can we move it to 'Radar' to track it?
Comment 6 zalan 2023-10-07 18:00:14 PDT
This is fixed. No extra space at the end of the second line. (IFC progression)
Comment 7 Ahmad Saleem 2023-10-07 18:04:57 PDT
Created attachment 468110 [details]
Safari vs Others

I get this in Safari vs other browsers.
Comment 8 zalan 2023-10-07 18:46:48 PDT
(In reply to Ahmad Saleem from comment #7)
> Created attachment 468110 [details]
> Safari vs Others
> 
> I get this in Safari vs other browsers.
Please file a bugzilla if you believe WebKit's optimizeLegibility implementation produces incorrect result here. By looking at the screenshot, it seems like we push for some advanced ligature, but I am no expert.