[cairo] typo in cairo-xml-surface.c?
suzuki toshiya
mpsuzuki at hiroshima-u.ac.jp
Sun Apr 7 07:22:20 UTC 2019
Dear Bryce,
I'm quite sorry for long long latency to post such very trivial
patch, in spite of your positive comment. Here I submit.
Regards,
mpsuzuki
Bryce Harrington wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-unclosed-scaled-font-element-in-xml-surface.patch
Type: text/x-patch
Size: 402 bytes
Desc: fix-unclosed-scaled-font-element-in-xml-surface.patch
URL: <https://lists.cairographics.org/archives/cairo/attachments/20190407/da690702/attachment.bin>
More information about the cairo
mailing list