Add font "index" to lmp parser.

When ttc index support was added, it was added and tested on Android
with the jb parser. This adds it to the lmp parser.

Review URL: https://codereview.chromium.org/1023313002
This commit is contained in:
bungeman 2015-03-23 09:08:54 -07:00 committed by Commit bot
parent 8010632f24
commit b8a1d30a42

View File

@ -159,6 +159,10 @@ 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("index", name, nameLen)) {
if (!parse_non_negative_integer(value, &file->fIndex)) {
SkDebugf("---- Font index %s (INVALID)", value);
}
}
}
XML_SetCharacterDataHandler(self->fParser, font_file_name_handler);