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.
Created attachment 332242 [details] screenshot
Created attachment 332358 [details] WIP patch
Created attachment 332359 [details] screenshot after this fix
I've confirmed AppleWin port also has this problem.
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
Created attachment 332632 [details] WIP patch
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.
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
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
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
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
(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.
(In reply to Alex Christensen from comment #12) Thanks for your comment. I'll do so.
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.
Created attachment 332740 [details] Patch
Comment on attachment 332740 [details] Patch Clearing flags on attachment: 332740 Committed r227876: <https://trac.webkit.org/changeset/227876>
All reviewed patches have been landed. Closing bug.
<rdar://problem/37059617>
*** Bug 182205 has been marked as a duplicate of this bug. ***