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

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 681823003: Match language tags by prefix on Android. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index 2865d800b7c34c0d40d7bdb09cbe52aadf375702..c527551575f7b3ddd3cfe626751101102cab3792 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -353,7 +353,7 @@ static SkTypeface_AndroidSystem* find_family_style_character(
SkFontStyleSet_Android* family = fallbackNameToFamilyMap[i].styleSet;
SkAutoTUnref<SkTypeface_AndroidSystem> face(family->matchStyle(style));
- if (!langTag.isEmpty() && langTag != face->fLang.getTag()) {
+ if (!langTag.isEmpty() && !face->fLang.getTag().startsWith(langTag.c_str())) {
continue;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698