Bug 213691

Summary: [WinCairo][Uniscribe] Katakana texts are unexpectedly wrapped because they don't fit into its own width
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: mmaxfield
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case
none
[Screenshot] WinCairo port
none
[screenshot] Goolge News (Japanese) of WinCairo port
none
10 katakana '二' characters in "MS PGothic" none

Description Fujii Hironori 2020-06-27 21:16:02 PDT
Created attachment 402981 [details]
test case

[WinCairo][Uniscribe] Katakana texts are unexpectedly wrapped because they don't fit into its own width
Comment 1 Fujii Hironori 2020-06-27 21:17:56 PDT
Created attachment 402982 [details]
[Screenshot] WinCairo port

AppleWin doesn't seem to have this issue.
Comment 2 Fujii Hironori 2020-06-27 21:20:55 PDT
Created attachment 402983 [details]
[screenshot] Goolge News (Japanese) of WinCairo port

The text of logo are unexpectedly wrapped in Goolge News (Japanese) of WinCairo port.
Comment 3 Fujii Hironori 2020-06-28 22:15:50 PDT
Created attachment 403029 [details]
10 katakana '二' characters in "MS PGothic"

This issue causes by "MS PGothic" which has an embedded bitmap font and is a proportional font.
'二' has 20px width in complex text code path, but 18px width in simple text path in WinCairo.

They are 20px width in both code path in AppleWin port.
10 '二' characters are 200px width in AppleWin port both for complex text and simple text code path.
AppleWin port is always using TreeType font for "MS PGothic".
Comment 4 Fujii Hironori 2020-06-29 21:55:16 PDT
RenderText::computePreferredLogicalWidths is assuming the sum of all widths of breakable characters is the preferred logical width.
I found a similar issue using line-break:anywhere and kerning.
Bug 213772 – The preferred logical width of a text with line-break:anywhere doesn't take kerning into account
Comment 6 Fujii Hironori 2020-10-09 14:37:51 PDT
(In reply to Fujii Hironori from comment #3)
> Created attachment 403029 [details]
> 10 katakana '二' characters in "MS PGothic"

This test case should be display in 100% display scaling factor, or zoom out to use the embedded bit map font in high DPI display.
Comment 7 Fujii Hironori 2023-03-07 12:20:07 PST
I don't see this bug anymore.
This bug seems to be already fixed by someone.

r287971 Bad
r289804 Good