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

Unified Diff: Source/platform/fonts/android/FontCacheAndroid.cpp

Issue 185863007: Try last resort on no-match in platformFallbackForCharacter on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Unit test Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/AlternateFontFamily.h ('k') | Source/platform/fonts/android/FontCacheAndroidTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/android/FontCacheAndroid.cpp
diff --git a/Source/platform/fonts/android/FontCacheAndroid.cpp b/Source/platform/fonts/android/FontCacheAndroid.cpp
index 24802fa6793fedad5a09727412633398917f8b4c..4f36d73221b5ca37cf6a3c048b99142be65019e0 100644
--- a/Source/platform/fonts/android/FontCacheAndroid.cpp
+++ b/Source/platform/fonts/android/FontCacheAndroid.cpp
@@ -64,7 +64,8 @@ static AtomicString getFamilyNameForCharacter(UChar32 c, UScriptCode script)
SkString skiaFamilyName;
if (!SkGetFallbackFamilyNameForChar(c, locale, &skiaFamilyName) || skiaFamilyName.isEmpty())
- return AtomicString();
+ return emptyAtom;
+
return skiaFamilyName.c_str();
}
@@ -72,7 +73,7 @@ PassRefPtr<SimpleFontData> FontCache::platformFallbackForCharacter(const FontDes
{
AtomicString familyName = getFamilyNameForCharacter(c, fontDescription.script());
if (familyName.isEmpty())
- return nullptr;
+ return getLastResortFallbackFont(fontDescription, DoNotRetain);
return fontDataFromFontPlatformData(getFontPlatformData(fontDescription, familyName), DoNotRetain);
}
« no previous file with comments | « Source/platform/fonts/AlternateFontFamily.h ('k') | Source/platform/fonts/android/FontCacheAndroidTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698