Lines Matching refs:FamilyData
28 * The FamilyData structure is passed around by the parser so that each handler
31 struct FamilyData {
32 FamilyData(XML_Parser *parserRef, SkTDArray<FontFamily*> &familiesRef) :
51 FamilyData *familyData = (FamilyData*) data;
53 if (familyData->currentFamily &&
54 (familyData->currentTag == NAMESET_TAG || familyData->currentTag == FILESET_TAG)) {
55 switch (familyData->currentTag) {
57 familyData->currentFamily->fNames.push_back().set(s, len);
60 if (familyData->currentFontInfo) {
61 familyData->currentFontInfo->fFileName.set(s, len);
75 static void fontFileElementHandler(FamilyData *familyData, const char **attributes) {
77 FontFileInfo& newFileInfo = familyData->currentFamily->fFontFiles.push_back();
98 familyData->currentFontInfo = &newFileInfo;
99 XML_SetCharacterDataHandler(*familyData->parser, textHandler);
107 FamilyData *familyData = (FamilyData*) data;
110 familyData->currentFamily = new FontFamily();
111 familyData->currentFamily->order = -1;
119 familyData->currentFamily->order = value;
123 familyData->currentTag = NAMESET_TAG;
125 familyData->currentTag = FILESET_TAG;
126 } else if (strncmp(tag, "name", len) == 0 && familyData->currentTag == NAMESET_TAG) {
128 XML_SetCharacterDataHandler(*familyData->parser, textHandler);
129 } else if (strncmp(tag, "file", len) == 0 && familyData->currentTag == FILESET_TAG) {
131 fontFileElementHandler(familyData, atts);
140 FamilyData *familyData = (FamilyData*) data;
144 *familyData->families.append() = familyData->currentFamily;
145 familyData->currentFamily = NULL;
147 familyData->currentTag = NO_TAG;
149 familyData->currentTag = NO_TAG;
150 } else if ((strncmp(tag, "name", len) == 0 && familyData->currentTag == NAMESET_TAG) ||
151 (strncmp(tag, "file", len) == 0 && familyData->currentTag == FILESET_TAG)) {
153 XML_SetCharacterDataHandler(*familyData->parser, NULL);
204 FamilyData *familyData = new FamilyData(&parser, families);
205 XML_SetUserData(parser, familyData);