[cairo] typo in cairo-xml-surface.c?

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Tue Dec 18 02:03:44 UTC 2018


Hi,

I found that the output of XML surface contains scaled-font
elements without closing tag, like, this:

<quote>
static cairo_status_t
_cairo_xml_emit_scaled_font (cairo_xml_t *xml,
                             cairo_scaled_font_t *scaled_font,
                             cairo_glyph_t *glyphs,
                             int num_glyphs)
{
    cairo_int_status_t status;

    _cairo_xml_printf (xml, "<scaled-font>");
    _cairo_xml_indent (xml, 2);

    status = _cairo_xml_emit_type42_font (xml, scaled_font);
    if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
        status = _cairo_xml_emit_type3_font (xml, scaled_font,
                                             glyphs, num_glyphs);
    }

    _cairo_xml_indent (xml, -2);
    _cairo_xml_printf (xml, "<scaled-font>");

    return status;
}
</quote>

_cairo_xml_emit_scaled_font() emit the opening tag of scaled-font
element, but does not emit the closing tag - it emits yet another
opening tag.

I'm not sure whether the change of the last cairo_xml_printf()
from <scaled-font> to </scaled-font> is harmful. Any idea to fix
this?

Regards,
mpsuzuki


More information about the cairo mailing list