Merge pull request #78543 from 3dnikita/fix-svg-in-ot-tag-closing

Fix SVG tag closing for OT font glyphs
This commit is contained in:
Rémi Verschelde 2023-06-22 18:31:14 +02:00
commit 18bc912bc0
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 12 additions and 2 deletions

View File

@ -121,7 +121,12 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
for (int i = 0; i < parser->get_attribute_count(); i++) {
xml_body += vformat(" %s=\"%s\"", parser->get_attribute_name(i), parser->get_attribute_value(i));
}
xml_body += ">";
if (parser->is_empty()) {
xml_body += "/>";
} else {
xml_body += ">";
}
} else if (parser->get_node_type() == XMLParser::NODE_TEXT) {
xml_body += parser->get_node_data();
} else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END) {

View File

@ -121,7 +121,12 @@ FT_Error tvg_svg_in_ot_preset_slot(FT_GlyphSlot p_slot, FT_Bool p_cache, FT_Poin
for (int i = 0; i < parser->get_attribute_count(); i++) {
xml_body += vformat(" %s=\"%s\"", parser->get_attribute_name(i), parser->get_attribute_value(i));
}
xml_body += ">";
if (parser->is_empty()) {
xml_body += "/>";
} else {
xml_body += ">";
}
} else if (parser->get_node_type() == XMLParser::NODE_TEXT) {
xml_body += parser->get_node_data();
} else if (parser->get_node_type() == XMLParser::NODE_ELEMENT_END) {