[cairo] typo in cairo-xml-surface.c?
Bryce Harrington
bryce at bryceharrington.org
Mon Jan 7 21:22:03 UTC 2019
On Tue, Dec 18, 2018 at 02:03:44AM +0000, suzuki toshiya wrote:
> 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?
Good find, I think. The line appears to have been there since the
beginning of the xml surface; I'm surprised it was not caught before
now.
Would you like to submit a patch to fix the incorrect line?
Bryce
More information about the cairo
mailing list