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

Unified Diff: src/ports/SkFontConfigParser_android.cpp

Issue 384503002: WIP SkFontMgrAndroid (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup main file 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
Index: src/ports/SkFontConfigParser_android.cpp
diff --git a/src/ports/SkFontConfigParser_android.cpp b/src/ports/SkFontConfigParser_android.cpp
index 38a6ee652065cf25160d291065659125042a8d7a..fbdcbf7a2ad16c014cdf599e7a8fc2854efd9dde 100644
--- a/src/ports/SkFontConfigParser_android.cpp
+++ b/src/ports/SkFontConfigParser_android.cpp
@@ -7,6 +7,7 @@
#include "SkFontConfigParser_android.h"
#include "SkTDArray.h"
+#include "SkTSearch.h"
#include "SkTypeface.h"
#include <expat.h>
@@ -48,13 +49,14 @@ 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:
- familyData->currentFamily->fNames.push_back().set(s, len);
+ familyData->currentFamily->fNames.push_back().set(tolc.lc(), len);
break;
case FILESET_TAG:
if (familyData->currentFontInfo) {

Powered by Google App Engine
This is Rietveld 408576698