Bug 213691 - [WinCairo][Uniscribe] Katakana texts are unexpectedly wrapped because they don't fit into its own width
Summary: [WinCairo][Uniscribe] Katakana texts are unexpectedly wrapped because they do...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-27 21:16 PDT by Fujii Hironori
Modified: 2023-03-07 12:20 PST (History)
1 user (show)

See Also:


Attachments
test case (708 bytes, text/html)
2020-06-27 21:16 PDT, Fujii Hironori
no flags Details
[Screenshot] WinCairo port (12.76 KB, image/png)
2020-06-27 21:17 PDT, Fujii Hironori
no flags Details
[screenshot] Goolge News (Japanese) of WinCairo port (40.90 KB, image/png)
2020-06-27 21:20 PDT, Fujii Hironori
no flags Details
10 katakana '二' characters in "MS PGothic" (422 bytes, text/html)
2020-06-28 22:15 PDT, Fujii Hironori
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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