RESOLVED FIXED 182093
[WinCairo] syntheticBoldOffset makes a font with embedded bitmap fonts shown as double strike in HiDPI
https://bugs.webkit.org/show_bug.cgi?id=182093
Summary [WinCairo] syntheticBoldOffset makes a font with embedded bitmap fonts shown ...
Fujii Hironori
Reported 2018-01-25 02:33:21 PST
Created attachment 332240 [details] test case [WinCairo] syntheticBoldOffset makes a font with embedded bitmap fonts shown as double strike in HiDPI MS Gothic is a Japanese font with embedded bitmap fonts. Meiryo is a Japanese font without embedded bitmap fonts.
Attachments
test case (594 bytes, text/html)
2018-01-25 02:33 PST, Fujii Hironori
no flags
screenshot (55.85 KB, image/png)
2018-01-25 02:34 PST, Fujii Hironori
no flags
WIP patch (683 bytes, patch)
2018-01-26 00:28 PST, Fujii Hironori
no flags
screenshot after this fix (86.42 KB, image/png)
2018-01-26 00:29 PST, Fujii Hironori
no flags
WIP patch (785 bytes, patch)
2018-01-29 23:37 PST, Fujii Hironori
no flags
Archive of layout-test-results from ews202 for win-future (12.38 MB, application/zip)
2018-01-30 10:12 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews201 for win-future (12.31 MB, application/zip)
2018-01-30 12:25 PST, EWS Watchlist
no flags
Patch (2.21 KB, patch)
2018-01-30 20:31 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2018-01-25 02:34:54 PST
Created attachment 332242 [details] screenshot
Fujii Hironori
Comment 2 2018-01-26 00:28:52 PST
Created attachment 332358 [details] WIP patch
Fujii Hironori
Comment 3 2018-01-26 00:29:29 PST
Created attachment 332359 [details] screenshot after this fix
Fujii Hironori
Comment 4 2018-01-28 17:56:54 PST
I've confirmed AppleWin port also has this problem.
Fujii Hironori
Comment 5 2018-01-29 02:04:02 PST
Font weight matching specifications: Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification: Font boldness: the 'font-weight' property https://www.w3.org/TR/CSS22/fonts.html#font-boldness CSS Fonts Module Level 3 the font-weight property https://www.w3.org/TR/2013/CR-css-fonts-3-20131003/#font-weight-prop Relevant bugs: Bug 6484 – font-weight does not properly support graded weights Bug 18311 – REGRESSION (r31620): Font variants (e.g. Helvetica Neue *Light*) don't render correctly Bug 18307 – REGRESSION (r31620): Incorrect Hiragino Kaku Gothic, font-weight:500 Bug 34147 – If @font-face does not provide an explicit italic/bold variant, regular is used
Fujii Hironori
Comment 6 2018-01-29 23:37:26 PST
Created attachment 332632 [details] WIP patch
Fujii Hironori
Comment 7 2018-01-30 00:00:31 PST
Hi Alex, Brent and Per Arne, I believe this change improves not only WinCairo port, but also AppleWin port. But, I can't set up LayoutTests env of AppleWin port on my Windows 10 PC. So, I can't check the regression and rebaseline expectations. Should I use `#if USE(CAIRO)` to change only WinCairo port? I have followed this instruction to set up LayoutTests env. (https://trac.webkit.org/wiki/BuildingOnWindows) This makes bunch of tests green. But, I still have some test failures due to text dimension differences.
EWS Watchlist
Comment 8 2018-01-30 10:12:39 PST
Comment on attachment 332632 [details] WIP patch Attachment 332632 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/6262205 New failing tests: fast/css/font-face-multiple-faces.html fonts/monospace.html fonts/cursive.html fast/text/font-weights-zh.html fonts/fantasy.html fast/forms/select/optgroup-rendering.html
EWS Watchlist
Comment 9 2018-01-30 10:12:50 PST
Created attachment 332665 [details] Archive of layout-test-results from ews202 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
EWS Watchlist
Comment 10 2018-01-30 12:25:24 PST
Comment on attachment 332632 [details] WIP patch Attachment 332632 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/6263618 New failing tests: fast/css/font-face-multiple-faces.html fonts/monospace.html fonts/cursive.html fast/text/font-weights-zh.html fonts/fantasy.html fast/forms/select/optgroup-rendering.html
EWS Watchlist
Comment 11 2018-01-30 12:25:35 PST
Created attachment 332682 [details] Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Alex Christensen
Comment 12 2018-01-30 16:32:38 PST
(In reply to Fujii Hironori from comment #7) > Should I use `#if USE(CAIRO)` to change only WinCairo port? Let's do that for now. I'd rather not change text in the AppleWin port like this unless we find content that we want to intentionally change.
Fujii Hironori
Comment 13 2018-01-30 19:21:17 PST
(In reply to Alex Christensen from comment #12) Thanks for your comment. I'll do so.
Fujii Hironori
Comment 14 2018-01-30 20:02:34 PST
Comment on attachment 332682 [details] Archive of layout-test-results from ews201 for win-future I checked all AppleWin port EWS LayoutTests failures. They seem to be caused by the difference of synthetic bold methods of WebKit and Windows. WebKit draws texts doubly by shifting 1px. Windows creates bold fonts from a TrueType fonts.
Fujii Hironori
Comment 15 2018-01-30 20:31:51 PST
WebKit Commit Bot
Comment 16 2018-01-30 23:28:27 PST
Comment on attachment 332740 [details] Patch Clearing flags on attachment: 332740 Committed r227876: <https://trac.webkit.org/changeset/227876>
WebKit Commit Bot
Comment 17 2018-01-30 23:28:29 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 18 2018-01-30 23:31:01 PST
Fujii Hironori
Comment 19 2018-01-30 23:43:30 PST
*** Bug 182205 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.