Chromium Code Reviews| Index: Source/platform/fonts/android/FontCacheAndroid.cpp |
| diff --git a/Source/platform/fonts/android/FontCacheAndroid.cpp b/Source/platform/fonts/android/FontCacheAndroid.cpp |
| index 131bc27e99dc4542f317a9925af070046fe96951..e8952481f758e3110f9b6ac3be9607670b249c18 100644 |
| --- a/Source/platform/fonts/android/FontCacheAndroid.cpp |
| +++ b/Source/platform/fonts/android/FontCacheAndroid.cpp |
| @@ -35,8 +35,8 @@ |
| #include "platform/fonts/SimpleFontData.h" |
| #include "platform/fonts/FontDescription.h" |
| #include "platform/fonts/FontFaceCreationParams.h" |
| - |
| -#include "SkTypeface_android.h" |
| +#include "third_party/skia/include/core/SkTypeface.h" |
| +#include "third_party/skia/include/ports/SkFontMgr.h" |
| namespace blink { |
| @@ -63,10 +63,13 @@ static AtomicString getFamilyNameForCharacter(UChar32 c, UScriptCode script) |
| break; |
| } |
| - SkString skiaFamilyName; |
| - if (!SkGetFallbackFamilyNameForChar(c, locale, &skiaFamilyName) || skiaFamilyName.isEmpty()) |
| + RefPtr<SkFontMgr> fm = adoptRef((SkFontMgr::RefDefault())); |
|
jbroman
2014/08/07 16:36:40
drive-by nit: why the double parentheses for both
bungeman-skia
2014/08/07 16:41:32
Thanks, for pointing that out, will fix. This was
|
| + RefPtr<SkTypeface> typeface = adoptRef((fm->matchFamilyStyleCharacter(0, SkFontStyle(), locale, c))); |
| + if (!typeface) |
| return emptyAtom; |
| + SkString skiaFamilyName; |
| + typeface->getFamilyName(&skiaFamilyName); |
| return skiaFamilyName.c_str(); |
| } |