Re: typo in cairo-xml-surface.c?

suzuki toshiya <[email protected]> Sun, 7 Apr 2019 07:22:20 +0000
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
--_002_5CA9A1A25000907hiroshimauacjp_
Content-Type: text/plain; charset="iso-2022-jp"
Content-ID: <[email protected]>
Content-Transfer-Encoding: quoted-printable

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 =3D _cairo_xml_emit_type42_font (xml, scaled_font);
>>     if (status =3D=3D CAIRO_INT_STATUS_UNSUPPORTED) {
>>         status =3D _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?
>=20
> 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.
>=20
> Would you like to submit a patch to fix the incorrect line?
>=20
> Bryce
>=20

--_002_5CA9A1A25000907hiroshimauacjp_
Content-Type: text/x-patch;
	name="fix-unclosed-scaled-font-element-in-xml-surface.patch"
Content-Description: fix-unclosed-scaled-font-element-in-xml-surface.patch
Content-Disposition: attachment;
	filename="fix-unclosed-scaled-font-element-in-xml-surface.patch"; size=402;
	creation-date="Sun, 07 Apr 2019 07:22:19 GMT";
	modification-date="Sun, 07 Apr 2019 07:22:19 GMT"
Content-ID: <[email protected]>
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL3NyYy9jYWlyby14bWwtc3VyZmFjZS5jIGIvc3JjL2NhaXJvLXhtbC1zdXJm
YWNlLmMNCmluZGV4IDM1NzczYTJiMi4uNDNjYjZkZGRmIDEwMDY0NA0KLS0tIGEvc3JjL2NhaXJv
LXhtbC1zdXJmYWNlLmMNCisrKyBiL3NyYy9jYWlyby14bWwtc3VyZmFjZS5jDQpAQCAtMTAwNyw3
ICsxMDA3LDcgQEAgX2NhaXJvX3htbF9lbWl0X3NjYWxlZF9mb250IChjYWlyb194bWxfdCAqeG1s
LA0KICAgICB9DQogDQogICAgIF9jYWlyb194bWxfaW5kZW50ICh4bWwsIC0yKTsNCi0gICAgX2Nh
aXJvX3htbF9wcmludGYgKHhtbCwgIjxzY2FsZWQtZm9udD4iKTsNCisgICAgX2NhaXJvX3htbF9w
cmludGYgKHhtbCwgIjwvc2NhbGVkLWZvbnQ+Iik7DQogDQogICAgIHJldHVybiBzdGF0dXM7DQog
fQ0K

--_002_5CA9A1A25000907hiroshimauacjp_
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp
c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8=

--_002_5CA9A1A25000907hiroshimauacjp_--