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..8f070e8603027de4758b8e4caef8cded2df45bdd 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()); |
| + RefPtr<SkTypeface> typeface = adoptRef(fm->matchFamilyStyleCharacter(0, SkFontStyle(), locale, c)); |
| + if (!typeface) |
| return emptyAtom; |
| + SkString skiaFamilyName; |
| + typeface->getFamilyName(&skiaFamilyName); |
| return skiaFamilyName.c_str(); |
|
f(malita)
2014/08/07 17:41:07
Unrelated nit: for the sake of the next person loo
bungeman-skia
2014/08/07 17:48:06
OMG, yes. This is what it was doing, so I'm leavin
|
| } |