Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Issue 1316843005: Round glyph width and bounds if !SkPaint.isSubpixelText() in complex path (Closed)

Created:
5 years, 3 months ago by kojii
Modified:
5 years, 3 months ago
Reviewers:
drott, eae, jbroman
CC:
blink-reviews, Rik, danakj, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Round glyph width and bounds if !SkPaint.isSubpixelText() in complex path This patch fixes HarfBuzzFace to round widths and bounds of glyphs when SkPaint.isSubpixelText() is false. SimpleFontData::platformWidthForGlyph() and platformBoundsForGlyph() have this rounding. This difference in HarfBuzzFace caused poor text positioning only in complex path. Unlike SimpleFontData that uses round() for glyphBounds, this CL uses roundOut() to avoid possible glyph rendering outside the visual overflow rect. The same fix for SimpleFontData is in a separate CL[1]. [1] https://codereview.chromium.org/1326563003/ BUG=452914 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201592

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Round bounds too if !isSubpixelText() #

Patch Set 4 : NeedsRebaseline #

Total comments: 1

Patch Set 5 : round to roundOut #

Patch Set 6 : NeedsRebaseline after roundOut #

Patch Set 7 : Rebase #

Patch Set 8 : Split SimpleFontData change to a separate CL #

Total comments: 1

Patch Set 9 : eae nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -1 line) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/text/complex-path-with-no-subpixel-fonts.html View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -0 lines 0 comments Download
M Source/platform/fonts/shaping/HarfBuzzFace.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -1 line 0 comments Download

Messages

Total messages: 14 (5 generated)
kojii
PTAL. The relevant part in SimpleFontData are getSkiaBoundsForGlyph: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp&q=simplefontdata&sq=package:chromium&type=cs&l=407 and platformWidthForGlyph: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp&q=simplefontdata&sq=package:chromium&type=cs&l=442
5 years, 3 months ago (2015-08-30 08:14:04 UTC) #4
jbroman
https://codereview.chromium.org/1316843005/diff/100001/Source/platform/fonts/shaping/HarfBuzzFace.cpp File Source/platform/fonts/shaping/HarfBuzzFace.cpp (right): https://codereview.chromium.org/1316843005/diff/100001/Source/platform/fonts/shaping/HarfBuzzFace.cpp#newcode155 Source/platform/fonts/shaping/HarfBuzzFace.cpp:155: if (!paint->isSubpixelText()) { drive-by question: Are these used to ...
5 years, 3 months ago (2015-08-30 16:08:06 UTC) #5
kojii
On 2015/08/30 16:08:06, jbroman wrote: > https://codereview.chromium.org/1316843005/diff/100001/Source/platform/fonts/shaping/HarfBuzzFace.cpp > File Source/platform/fonts/shaping/HarfBuzzFace.cpp (right): > > https://codereview.chromium.org/1316843005/diff/100001/Source/platform/fonts/shaping/HarfBuzzFace.cpp#newcode155 > ...
5 years, 3 months ago (2015-08-30 18:05:30 UTC) #6
kojii
PTAL again, round() were changed to roundOut(). Visual overflow clipping test was fixed by this ...
5 years, 3 months ago (2015-08-31 08:56:52 UTC) #7
jbroman
On 2015/08/31 at 08:56:52, kojii wrote: > PTAL again, round() were changed to roundOut(). > ...
5 years, 3 months ago (2015-09-01 15:07:42 UTC) #8
eae
LGTM w/nit The test is going to become obsolete pretty soon (when we remove the ...
5 years, 3 months ago (2015-09-01 16:24:38 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1316843005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1316843005/200001
5 years, 3 months ago (2015-09-02 01:06:40 UTC) #12
eae
Thanks!
5 years, 3 months ago (2015-09-02 01:06:53 UTC) #13
commit-bot: I haz the power
5 years, 3 months ago (2015-09-02 01:11:38 UTC) #14
Message was sent while issue was closed.
Committed patchset #9 (id:200001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201592

Powered by Google App Engine
This is Rietveld 408576698