Bug 54004 - -webkit-font-smoothing:antialiased has no effect on GDI text
Summary: -webkit-font-smoothing:antialiased has no effect on GDI text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: data:text/html,<p style="-webkit-font...
Keywords: InRadar, PlatformOnly
: 94958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-08 07:56 PST by Adam Roben (:aroben)
Modified: 2012-08-24 17:49 PDT (History)
5 users (show)

See Also:


Attachments
patch (9.52 KB, patch)
2012-08-24 11:32 PDT, Roger Fong
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-02-08 07:56:30 PST
To reproduce:

1. Turn on ClearType
2. In Edit > Preferences... > Appearance, set "Font smoothing:" to "Windows Standard"
3. Go to data:text/html,<p style="-webkit-font-smoothing:antialiased">This text should not be subpixel-antialiased.</p><p>This text should be subpixel-antialiased.</p>

Both sentences look the same. If you turn on CG text (by changing "Font smoothing:" to some other setting), you can see that the first sentence is not subpixel-antialiased, while the second one is.
Comment 1 Adam Roben (:aroben) 2011-02-08 07:58:24 PST
<rdar://problem/8971429>
Comment 2 Roger Fong 2012-08-24 11:18:58 PDT
When specifying -webkit-font-smoothing: antialised; the code path ends up using GDI to draw the text. 
Firstly, this causes a lot of transparency issues since GDI has no concept of an alpha channel.
Secondly, in the code path, GDI ends up drawing subpixel antialiased text, not aliased text anyways.

The CG code path also has the capability of drawing antialiased text. The reason that the GDI path was used in the first place is no longer a concern here so we can stop using the GDI code path.

I'll be getting rid of the GDI code path so that font rendering on windows only uses CG code path for font rendering, instead of sometimes using CG and sometimes using GDI.
Comment 3 Roger Fong 2012-08-24 11:19:44 PDT
*** Bug 94958 has been marked as a duplicate of this bug. ***
Comment 4 Roger Fong 2012-08-24 11:32:54 PDT
Created attachment 160460 [details]
patch
Comment 5 WebKit Review Bot 2012-08-24 17:23:04 PDT
Comment on attachment 160460 [details]
patch

Rejecting attachment 160460 [details] from commit-queue.

roger_fong@apple.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.

- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.
Comment 6 WebKit Review Bot 2012-08-24 17:49:43 PDT
Comment on attachment 160460 [details]
patch

Clearing flags on attachment: 160460

Committed r126666: <http://trac.webkit.org/changeset/126666>
Comment 7 WebKit Review Bot 2012-08-24 17:49:46 PDT
All reviewed patches have been landed.  Closing bug.