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

Unified Diff: src/ports/SkFontConfigParser_android.cpp

Issue 465973002: Fix lower-casing error in font config parser (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/SkFontConfigParser_android.cpp
diff --git a/src/ports/SkFontConfigParser_android.cpp b/src/ports/SkFontConfigParser_android.cpp
index 11fde84ae57d6099e25dde34f5635840d11a7ebd..c6a3cf261fc7230531c7dad3dd1daf8272bfe45f 100644
--- a/src/ports/SkFontConfigParser_android.cpp
+++ b/src/ports/SkFontConfigParser_android.cpp
@@ -92,7 +92,8 @@ void familyElementHandler(FontFamily* family, const char** attributes) {
size_t nameLen = strlen(name);
size_t valueLen = strlen(value);
if (nameLen == 4 && !strncmp("name", name, nameLen)) {
- family->fNames.push_back().set(value);
+ SkAutoAsciiToLC tolc(value);
+ family->fNames.push_back().set(tolc.lc());
} else if (nameLen == 4 && !strncmp("lang", name, nameLen)) {
family->fLanguage = SkLanguage (value);
} else if (nameLen == 7 && !strncmp("variant", name, nameLen)) {
@@ -168,7 +169,8 @@ void aliasElementHandler(FamilyData* familyData, const char** attributes) {
const char* value = attributes[i+1];
size_t nameLen = strlen(name);
if (nameLen == 4 && !strncmp("name", name, nameLen)) {
- aliasName.set(value);
+ SkAutoAsciiToLC tolc(value);
+ aliasName.set(tolc.lc());
} else if (nameLen == 2 && !strncmp("to", name, nameLen)) {
to.set(value);
} else if (nameLen == 6 && !strncmp("weight", name, nameLen)) {
« 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