linebender / resvg

An SVG rendering library.
Apache License 2.0
2.84k stars 229 forks source link

SVG fails to parse #749

Closed LaurenzV closed 6 months ago

LaurenzV commented 7 months ago

Attempting to render the following SVG:

test

results in the following message: Error: an unknown namespace prefix 'kvg' at 39:19.

Not sure if it's a malformed SVG, but at least it opens fine in Chrome, Safari and Firefox.

LaurenzV commented 7 months ago

Adding xmlns:kvg="http://kanjivg.tagaini.net" to the root SVG seems to fix it. But not sure if it's really not supposed to render without it? I'm not really sure what ATTLIST is. But in any case, since it opens fine on all other browsers maybe we should allow this too (in case this SVG really is malformed).

RazrFalcon commented 6 months ago

I cannot download the file for some reason. Can you re-upload it?

LaurenzV commented 6 months ago

You can find it here: https://github.com/KanjiVG/kanjivg/blob/master/kanji/06c34.svg

RazrFalcon commented 6 months ago

Yep, that's some XML DTD magic. We do not support it and would probably never will be. Sadly, but out of scope.