GNOME Bugzilla – Bug 166385
Flag of Arizona has misplaced star with librsvg
Last modified: 2005-02-07 03:27:14 UTC
Please describe the problem: While updating the SVG flag collection I notice that the Arizona flag do not render correctly with librsvg. The star is not in the middle. Flag can be gotten here: http://openclipart.org/clipart//signs_and_symbols/flags/america/united_states/usa_arizona.svg Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 37036 [details] French coatofarms that renders wrongly
Avast... methinks it's a problem with zee flag SVG (for the Arizona flag). I'm nowhere near a linux box at the moment, but I can tell you that Adobe doesn't render this like it should. I can try to fix it when I get home.
i couldn't help but think of the Corsair Keyboard, rahga... http://personal.riverusers.com/~jrbaker/pirate_keyboard.jpg
Created attachment 37052 [details] Fixed SVG
Yep. It's the SVG allright. The problem is it uses sodipodi tags to specify attributes on the image that are not translated properly into real svg tags for renderers like RSVG to use. When I removed the sodipodi tags from the file it looked identical in inkscape to what it did through rsvg. For this reason I suggest all SVGs be saved as "plain svg" before being used in the collection. I also took the liberty of making a fixed version.
Got the following from Inkscape hacker bulia byak: Summary: Yes this file is broken, but the source of the problem is either Sodipodi or an early version of Inkscape, not modern Inkscape. Modern Inkscape is only guilty of trying to be Sodipodi-compatible more than SVG-compatible, and this must be fixed. You cannot create a similarly broken file with a modern Inkscape if you start from scratch. Details: This file uses a <polygon> to represent the star. For some reason unknown, the SVG attribute points= went out of sync with the Sodipodi attributes (sodipodi:cx, etc). (I remember we had a Sodipodi-inherited bug of points= not being updated properly in some situations, but it was fixed long ago.) Now, Sodipodi and Inkscape (including the most recent version of Inkscape) obeys the sodipodi: attributes, but all other renderers obey the points= attribute and therefore display the star differently. An additional complication is that we have long ago switched from using <polygon> to using <path> for stars (because we added rounded stars which can only be shown as paths). Therefore, modern Inkscape lacks code for updating points= attribute (which is only allowed on <polygin>) and updates only the d= of <path>. So, even if you load that file into modern Inkscape and edit the star, it will remain <polygon> and its points= will not be updated. And this is the problem which we need to fix. Proposal: I think that if we see a polygon with sodipodi:type="star", we must treat it as a polygon, not as a Sodipodi/Inkscape star object. As a result, this file will look broken in Inkscape too, but this is correct. As for this particular file, to fix it you can either save as plain SVG or just convert that star to path (Ctrl+Shift+C) and save as usual. Closing this bug as notabug. Thanks for the input from everyone.
I fixed librsvg to render the coat of arms correctly. It had two problems. Firstly: it uses <use> tags that instance things that have not been defined yet. Secondly: it uses the <a> tag which was unsupported by rsvg (now it simply treats them like <g> tags)