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

Unified Diff: src/ports/SkFontConfigParser_android.cpp

Issue 420223003: Only lowercase names in Android font config parser. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 fc8e9199c310ac438932631397c34103603bcc01..cc2ca8cad92f7fe4fcc7e4e66a0c24833081635a 100644
--- a/src/ports/SkFontConfigParser_android.cpp
+++ b/src/ports/SkFontConfigParser_android.cpp
@@ -51,15 +51,16 @@ struct FamilyData {
* or file tag. The resulting strings are put into the fNames or FontFileInfo arrays.
*/
static void textHandler(void *data, const char *s, int len) {
- SkAutoAsciiToLC tolc(s);
FamilyData *familyData = (FamilyData*) data;
// Make sure we're in the right state to store this name information
if (familyData->currentFamily &&
(familyData->currentTag == NAMESET_TAG || familyData->currentTag == FILESET_TAG)) {
switch (familyData->currentTag) {
- case NAMESET_TAG:
+ case NAMESET_TAG: {
+ SkAutoAsciiToLC tolc(s, len);
familyData->currentFamily->fNames.push_back().set(tolc.lc(), len);
break;
+ }
case FILESET_TAG:
if (familyData->currentFontInfo) {
familyData->currentFontInfo->fFileName.set(s, len);
« 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