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

Issue 1740593002: Use Skia's matchFamilyStyleCharacter API for font fallback (Closed)

Created:
4 years, 10 months ago by Ilya Kulshin
Modified:
4 years, 8 months ago
Reviewers:
jam, eae
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, vmpstr+blinkwatch_chromium.org, dshwang, jbroman, Justin Novosad, danakj+watch_chromium.org, Rik, darin-cc_chromium.org, blink-reviews, f(malita), kinuko+watch, Stephen Chennney, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add code to call skia's matchFamilyStyleCharacter API, which uses the DirectWrite font fallback to find fonts for characters that do not exist in the default font. The FontCache and FontDescription changes are refactorings of shared code out of FontCacheAndroid and FontCacheSkiaWin. The FontCacheSkiaWin change adds logic to call skia's matchFamilyStyleCharacter API, which will ultimately call into DirectWrite. This requires skia change https://codereview.chromium.org/1740533003/, which ensures that the font fallback is initialized prior to sandbox start. BUG=459056

Patch Set 1 #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : Add a numericFontWeight API and reformat for line length #

Patch Set 4 : Add tests and rely on skia to initialize font fallback #

Patch Set 5 : Merge and fix formatting #

Patch Set 6 : Merge #

Messages

Total messages: 14 (5 generated)
Ilya Kulshin
ptal: eae@ - third_party/WebKit/Source/platform/fonts/* jam@ - content/child/font_warmup_win.cc
4 years, 9 months ago (2016-02-29 22:47:17 UTC) #4
eae
https://codereview.chromium.org/1740593002/diff/40001/third_party/WebKit/Source/platform/fonts/FontDescription.cpp File third_party/WebKit/Source/platform/fonts/FontDescription.cpp (right): https://codereview.chromium.org/1740593002/diff/40001/third_party/WebKit/Source/platform/fonts/FontDescription.cpp#newcode284 third_party/WebKit/Source/platform/fonts/FontDescription.cpp:284: int fontWeight = (weight() - FontWeight100 + 1) * ...
4 years, 9 months ago (2016-02-29 23:11:26 UTC) #5
Ilya Kulshin
https://codereview.chromium.org/1740593002/diff/40001/third_party/WebKit/Source/platform/fonts/FontDescription.cpp File third_party/WebKit/Source/platform/fonts/FontDescription.cpp (right): https://codereview.chromium.org/1740593002/diff/40001/third_party/WebKit/Source/platform/fonts/FontDescription.cpp#newcode284 third_party/WebKit/Source/platform/fonts/FontDescription.cpp:284: int fontWeight = (weight() - FontWeight100 + 1) * ...
4 years, 9 months ago (2016-03-01 03:31:14 UTC) #6
jam
On 2016/02/29 22:47:17, Ilya Kulshin wrote: > ptal: > > eae@ - third_party/WebKit/Source/platform/fonts/* > jam@ ...
4 years, 9 months ago (2016-03-01 16:40:05 UTC) #7
jam
lgtm
4 years, 9 months ago (2016-03-01 20:03:19 UTC) #8
jam
actually why are the two file in content/child duplicating code instead of sharing it?
4 years, 9 months ago (2016-03-01 20:05:54 UTC) #9
eae
LGTM, thank you.
4 years, 9 months ago (2016-03-01 20:06:05 UTC) #10
Ilya Kulshin
On 2016/03/01 20:05:54, jam wrote: > actually why are the two file in content/child duplicating ...
4 years, 9 months ago (2016-03-01 20:11:01 UTC) #11
jam
4 years, 9 months ago (2016-03-01 20:22:11 UTC) #12
On 2016/03/01 20:11:01, Ilya Kulshin wrote:
> On 2016/03/01 20:05:54, jam wrote:
> > actually why are the two file in content/child duplicating code instead of
> > sharing it?
> 
> For such a small amount of code (one QueryInterface and one actual function
> call), didn't really seem worthwhile to extract a shared function. I could do
> that if you feel strongly about it, but the benefit seems to be minimal.

well it's almost 10 lines of code, and there's the
blink::WebFontRendering::setSkiaFontManager. i think better to have a shared
method.

Powered by Google App Engine
This is Rietveld 408576698