GNOME Bugzilla – Bug 612951
SVG not rendered if header contains width or height in percentage
Last modified: 2010-04-07 03:57:08 UTC
Created attachment 156191 [details] non-renderable SVG image Evince does not render an SVG vector image if the header contains something like: <svg width="100%" height="100%" ... > Other values than 100% also fail. But if width and height are removed from header, then rendering works. The SVG document standard [1] says: "If the attribute (width and height) is not specified, the effect is as if a value of "100%" were specified." gnome-thumbnailer is also affected, so the bug itself may be located in the library both evince an gnome-thumbnailer call to render an SVG. [1] http://www.w3.org/TR/SVG/struct.html#NewDocument
Evince image backend uses GdkPixbuf, so I guess it's a bug in GdkPixbuf or even in librsvg. Moving to GdkPixbuf. Thanks for reporting.
rsvg-view has the same problem, so I would say this is an issue in librsvg
Created attachment 157573 [details] [review] Proposed patch This patch makes attachment 15691 [details] [review] viewable by rsvg-view.
Created attachment 157743 [details] [review] Use viewBox width and height if these values are in there This change also fixes bug #608102.
Created attachment 157962 [details] [review] Fix I noticed bug #564527 is the principal issue among width and height related issues. This patch depends on the fix for #bug564527.
This second patch covers bug 608102 and bug 614018, so I duplicate those bugs of this bug.
*** Bug 608102 has been marked as a duplicate of this bug. ***
*** Bug 614018 has been marked as a duplicate of this bug. ***
Pushed. http://git.gnome.org/browse/librsvg/commit/?id=e07a6d01f722a083cb16abc0225dadb1a7c0ff3e