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

Unified Diff: src/ports/SkFontMgr_fontconfig.cpp

Issue 673443003: Update fontMgr to take list of bcp47 language tags. (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
« include/ports/SkFontMgr.h ('K') | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_fontconfig.cpp
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
index 6fc1f28c89bc318ce2d26622b5acf94f0da295ef..95560a70516fc64ca726009fbb343a7744d877a2 100644
--- a/src/ports/SkFontMgr_fontconfig.cpp
+++ b/src/ports/SkFontMgr_fontconfig.cpp
@@ -771,8 +771,9 @@ protected:
virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[],
const SkFontStyle& style,
- const char bpc47[],
- uint32_t character) const SK_OVERRIDE
+ const char** bcp47,
+ size_t bcpLength,
+ SkUnichar character) const SK_OVERRIDE
{
FCLocker lock;
@@ -784,9 +785,12 @@ protected:
FcCharSetAddChar(charSet, character);
FcPatternAddCharSet(pattern, FC_CHARSET, charSet);
- if (bpc47) {
+ if (bcpLength > 0) {
+ SkASSERT(bcp47);
SkAutoFcLangSet langSet;
- FcLangSetAdd(langSet, (const FcChar8*)bpc47);
+ for (size_t i = 0; i < bcpLength; i++) {
+ FcLangSetAdd(langSet, (const FcChar8*)bcp47[i]);
+ }
FcPatternAddLangSet(pattern, FC_LANG, langSet);
}
« include/ports/SkFontMgr.h ('K') | « src/ports/SkFontMgr_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698