WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
88263
Add support for enabling text subpixel positioning in Skia
https://bugs.webkit.org/show_bug.cgi?id=88263
Summary
Add support for enabling text subpixel positioning in Skia
Daniel Erat
Reported
2012-06-04 15:55:26 PDT
The Skia backend supports subpixel-positioned text (via SkPaint::setSubpixelText()), but we currently lack a way to enable it. I have a change that adds a useSubpixelPositioning field to FontRenderStyle and WebFontRenderStyle and makes FontPlatformDataHarfBuzz apply it to the SkPaint. It also renames the existing useSubpixel fields to useSubpixelRendering.
Attachments
Patch
(15.59 KB, patch)
2012-06-04 17:46 PDT
,
Daniel Erat
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(720.26 KB, application/zip)
2012-06-05 06:16 PDT
,
WebKit Review Bot
no flags
Details
Patch
(15.65 KB, patch)
2012-06-05 09:45 PDT
,
Daniel Erat
no flags
Details
Formatted Diff
Diff
Patch
(53.73 KB, patch)
2012-06-05 15:32 PDT
,
Daniel Erat
no flags
Details
Formatted Diff
Diff
Patch
(49.29 KB, patch)
2012-06-05 16:10 PDT
,
Daniel Erat
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(789.67 KB, application/zip)
2012-06-06 07:52 PDT
,
WebKit Review Bot
no flags
Details
Patch
(52.72 KB, patch)
2012-06-06 15:04 PDT
,
Daniel Erat
no flags
Details
Formatted Diff
Diff
Patch
(4.71 KB, patch)
2012-06-13 09:13 PDT
,
Daniel Erat
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Erat
Comment 1
2012-06-04 17:46:49 PDT
Created
attachment 145665
[details]
Patch
WebKit Review Bot
Comment 2
2012-06-04 17:48:03 PDT
Please wait for approval from
abarth@webkit.org
,
dglazkov@chromium.org
,
fishd@chromium.org
,
jamesr@chromium.org
or
tkent@chromium.org
before submitting, as this patch contains changes to the Chromium public API. See also
https://trac.webkit.org/wiki/ChromiumWebKitAPI
.
Behdad Esfahbod
Comment 3
2012-06-04 18:23:46 PDT
+ // FontConfig doesn't provide parameters to configure whether subpixel + // positioning should be used or not. + out->useSubpixelPositioning = 2; A better default may be to enable this if hinting is off?
WebKit Review Bot
Comment 4
2012-06-05 06:16:28 PDT
Comment on
attachment 145665
[details]
Patch
Attachment 145665
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/12901496
New failing tests: fonts/fantasy.html fast/css/font-face-synthetic-bold-italic.html fast/text/fake-italic.html fonts/cursive.html fast/css/font-face-multiple-faces.html
WebKit Review Bot
Comment 5
2012-06-05 06:16:32 PDT
Created
attachment 145778
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Daniel Erat
Comment 6
2012-06-05 08:05:19 PDT
#3: Not sure. That seems like a fairly substantial change in behavior; I'd prefer for this change to be a no-op for now except in the case where we explicitly request subpixel positioning.
Behdad Esfahbod
Comment 7
2012-06-05 08:06:45 PDT
Fair enough. I'll go request an element for this in Fontconfig...
Daniel Erat
Comment 8
2012-06-05 09:45:32 PDT
Created
attachment 145823
[details]
Patch
Daniel Erat
Comment 9
2012-06-05 09:50:22 PDT
The patch from #8 makes SimpleFontData::platformWidthForGlyph() again round widths, but now only when subpixel positioning is disabled. It looks like SkPaint::measureText() is returning fractional widths for fake-italics (and maybe also fake-bold?). Behdad suggests that Skia should be doing the rounding itself when subpixel positioning is disabled; I think that ensuring that this is the case within WebKit is safe.
Tony Chang
Comment 10
2012-06-05 14:20:10 PDT
Comment on
attachment 145823
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145823&action=review
Code change looks fine. You'll have to wait for an API reviewer to take a look at this change.
> Source/WebCore/ChangeLog:13 > + Pass setting to SkPaint in FontPlatformDataHarfBuzz and remove > + round() call when computing glyph widths in SimpleFontDataSkia. > +
Please add a sentence about why there are no new tests. E.g., No new tests because this shouldn't change page rendering. It might be possible to write a gtest style test (see the Source/WebKit/chromium/tests directory) for what is exposed via WebFontRenderStyle.h, but I'm not sure if you can verify that the value was properly set.
> Source/WebCore/platform/graphics/chromium/FontRenderStyle.h:49 > - useSubpixel(0) { } > + useSubpixelRendering(0), > + useSubpixelPositioning(0) { }
Nit: WebKit style normally puts the , in front (lines up below the :).
Daniel Erat
Comment 11
2012-06-05 15:32:45 PDT
Created
attachment 145881
[details]
Patch
Tony Chang
Comment 12
2012-06-05 15:41:22 PDT
Comment on
attachment 145881
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145881&action=review
> LayoutTests/platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html:3 > + <p>This test requires Chromium Linux <tt>test_shell</tt> in
Nit: I would change this text to "This test requires DumpRenderTree, as that ..."
Daniel Erat
Comment 13
2012-06-05 16:10:29 PDT
Created
attachment 145890
[details]
Patch
James Robinson
Comment 14
2012-06-05 16:34:19 PDT
Comment on
attachment 145890
[details]
Patch Public WebKit API lgtm
WebKit Review Bot
Comment 15
2012-06-06 07:51:54 PDT
Comment on
attachment 145890
[details]
Patch
Attachment 145890
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/12897824
New failing tests: platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html
WebKit Review Bot
Comment 16
2012-06-06 07:52:13 PDT
Created
attachment 146030
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Daniel Erat
Comment 17
2012-06-06 15:04:55 PDT
Created
attachment 146119
[details]
Patch
Tony Chang
Comment 18
2012-06-06 15:09:23 PDT
Comment on
attachment 146119
[details]
Patch Adding a new entry to fonts.conf seems fine.
WebKit Review Bot
Comment 19
2012-06-07 09:59:00 PDT
Comment on
attachment 146119
[details]
Patch Clearing flags on attachment: 146119 Committed
r119732
: <
http://trac.webkit.org/changeset/119732
>
WebKit Review Bot
Comment 20
2012-06-07 09:59:11 PDT
All reviewed patches have been landed. Closing bug.
Daniel Erat
Comment 21
2012-06-13 09:12:58 PDT
Reopening to attach new patch.
Daniel Erat
Comment 22
2012-06-13 09:13:02 PDT
Created
attachment 147334
[details]
Patch
Daniel Erat
Comment 23
2012-06-13 09:13:43 PDT
The new patch removes a field that was deprecated by this change.
Adam Barth
Comment 24
2012-06-13 09:17:48 PDT
(In reply to
comment #21
)
> Reopening to attach new patch.
Normally we use a new bug for each patch.
WebKit Review Bot
Comment 25
2012-06-14 15:01:13 PDT
Comment on
attachment 147334
[details]
Patch Clearing flags on attachment: 147334 Committed
r120363
: <
http://trac.webkit.org/changeset/120363
>
WebKit Review Bot
Comment 26
2012-06-14 15:01:19 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug