Index: src/ports/SkFontConfigParser_android.cpp |
diff --git a/src/ports/SkFontConfigParser_android.cpp b/src/ports/SkFontConfigParser_android.cpp |
index ffc60427f47a0d841288f8c9ff997e057f793385..9bab84556b105f2f3dc06933a620e48aa4d2311e 100644 |
--- a/src/ports/SkFontConfigParser_android.cpp |
+++ b/src/ports/SkFontConfigParser_android.cpp |
@@ -159,6 +159,13 @@ static void font_element_handler(FamilyData* self, FontFileInfo* file, const cha |
if (!parse_non_negative_integer(value, &file->fWeight)) { |
SkDebugf("---- Font weight %s (INVALID)", value); |
} |
+ } else if (MEMEQ("style", name, nameLen)) { |
+ size_t valueLen = strlen(value); |
+ if (MEMEQ("normal", value, valueLen)) { |
+ file->fStyle = FontFileInfo::Style::kNormal; |
+ } else if (MEMEQ("italic", value, valueLen)) { |
+ file->fStyle = FontFileInfo::Style::kItalic; |
+ } |
} else if (MEMEQ("index", name, nameLen)) { |
if (!parse_non_negative_integer(value, &file->fIndex)) { |
SkDebugf("---- Font index %s (INVALID)", value); |