aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontConfigInterface_android.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ports/SkFontConfigInterface_android.cpp b/src/ports/SkFontConfigInterface_android.cpp
index 9c188d90c6..6f9ed3a93b 100644
--- a/src/ports/SkFontConfigInterface_android.cpp
+++ b/src/ports/SkFontConfigInterface_android.cpp
@@ -513,7 +513,14 @@ SkTypeface* SkFontConfigInterfaceAndroid::getTypefaceForFontRec(FontRecID fontRe
bool SkFontConfigInterfaceAndroid::getFallbackFamilyNameForChar(SkUnichar uni,
const char* lang,
SkString* name) {
- FallbackFontList* fallbackFontList = this->findFallbackFontList(lang);
+ FallbackFontList* fallbackFontList = NULL;
+ const SkString langTag(lang);
+ if (langTag.isEmpty()) {
+ fallbackFontList = this->getCurrentLocaleFallbackFontList();
+ } else {
+ fallbackFontList = this->findFallbackFontList(langTag);
+ }
+
for (int i = 0; i < fallbackFontList->count(); i++) {
FamilyRecID familyRecID = fallbackFontList->getAt(i);
@@ -733,9 +740,8 @@ SkTypeface* SkFontConfigInterfaceAndroid::getTypefaceForGlyphID(uint16_t glyphID
///////////////////////////////////////////////////////////////////////////////
bool SkGetFallbackFamilyNameForChar(SkUnichar uni, SkString* name) {
- SkString locale = SkFontConfigParser::GetLocale();
SkFontConfigInterfaceAndroid* fontConfig = getSingletonInterface();
- return fontConfig->getFallbackFamilyNameForChar(uni, locale.c_str(), name);
+ return fontConfig->getFallbackFamilyNameForChar(uni, NULL, name);
}
bool SkGetFallbackFamilyNameForChar(SkUnichar uni, const char* lang, SkString* name) {