After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166385 - Flag of Arizona has misplaced star with librsvg
Flag of Arizona has misplaced star with librsvg
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.9.x
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-05 18:49 UTC by Christian Fredrik Kalager Schaller
Modified: 2005-02-07 03:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
French coatofarms that renders wrongly (22.00 KB, image/svg+xml)
2005-02-05 19:05 UTC, Christian Fredrik Kalager Schaller
Details
Fixed SVG (4.63 KB, image/svg+xml)
2005-02-06 07:10 UTC, Caleb Moore
Details

Description Christian Fredrik Kalager Schaller 2005-02-05 18:49:53 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:
Comment 1 Christian Fredrik Kalager Schaller 2005-02-05 19:05:35 UTC
Created attachment 37036 [details]
French coatofarms that renders wrongly
Comment 2 Richard Hoelscher 2005-02-05 22:59:35 UTC
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.
Comment 3 Dominic Lachowicz 2005-02-05 23:07:20 UTC
i couldn't help but think of the Corsair Keyboard, rahga...

http://personal.riverusers.com/~jrbaker/pirate_keyboard.jpg
Comment 4 Caleb Moore 2005-02-06 07:10:07 UTC
Created attachment 37052 [details]
Fixed SVG
Comment 5 Caleb Moore 2005-02-06 07:10:44 UTC
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.
Comment 6 Christian Fredrik Kalager Schaller 2005-02-06 13:17:00 UTC
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.
Comment 7 Caleb Moore 2005-02-07 03:27:14 UTC
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)