Summary: | [WinCairo] -webkit-font-smoothing:antialiased makes fonts blurry | ||
---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> |
Component: | Platform | Assignee: | Fujii Hironori <Hironori.Fujii> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | achristensen, don.olmstead, ross.kirsling, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Attachments: |
Description
Fujii Hironori
2020-01-22 00:25:44 PST
Created attachment 388403 [details]
[Screenshot] Google News (Japan) of WinCairo port (150% display scale factor)
Created attachment 388406 [details]
test case
Created attachment 388502 [details] [screenshot] GMail in WinCairo (with -webkit-font-smoothing support, r254899) I realized GMail also looks blurry even for alphabet. Created attachment 388504 [details] [screenshot] GMail in WinCairo (without -webkit-font-smoothing support, r254326) Old WinCairo renders clearly. I'm spoofing Safari User-Agent string to use GMail in WinCairo. Created attachment 402626 [details] [screenshot] https://www.apple.com/ in WinCairo (with -webkit-font-smoothing support, r254899) -webkit-font-smoothing:antialiased is mapped to CAIRO_ANTIALIAS_GRAY. And CAIRO_ANTIALIAS_GRAY is mapped to ANTIALIASED_QUALITY. If I changed to use DEFAULT_QUALITY instead of ANTIALIASED_QUALITY by applying the following patch to Cairo, the font looked good. diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c index 1f217573b..355192dc0 100644 --- a/src/win32/cairo-win32-font.c +++ b/src/win32/cairo-win32-font.c @@ -347,7 +347,7 @@ _win32_scaled_font_create (LOGFONTW *logfont, case CAIRO_ANTIALIAS_GRAY: case CAIRO_ANTIALIAS_FAST: case CAIRO_ANTIALIAS_GOOD: - f->quality = ANTIALIASED_QUALITY; + f->quality = DEFAULT_QUALITY; break; case CAIRO_ANTIALIAS_SUBPIXEL: case CAIRO_ANTIALIAS_BEST: This issue seems a Windows API issue. Created attachment 402627 [details]
Patch
Created attachment 402628 [details] [screenshot] https://www.apple.com/ in WinCairo with the proposed patch Comment on attachment 402627 [details]
Patch
This seems fine.
Committed r263471: <https://trac.webkit.org/changeset/263471> |