GNOME Bugzilla – Bug 581108
SVG image does not display correctly
Last modified: 2013-11-15 13:17:51 UTC
An SVG image created in Inkscape 0.46 does not display correcty in gThumb. The following line of text (within the image):
Home of the doghouse!
Home of the !doghouse
in gThumb. It displays correctly in Inkscape and as a background image in GNOME. I have the image if you need/want it.
Yes, please attach a sample image.
Created attachment 133972 [details]
Small SVG image which exhibts the described problem
Confirmed on Fedora 10 with librsvg2-2.22.3-1.fc10.x86_64.
Re-assigning to librsvg, the library that provides the svg gdk-pixbuf loader.
Dominic, do you have any copy of sample files for this commit? <http://git.gnome.org/browse/librsvg/commit/?id=0acabfc0becefdf7c349a80b67c652613d0252bf>
Unfortunately, the image in this mail <http://lists.cairographics.org/archives/cairo/2008-February/013082.html> has been gone.
This bug is exactly caused by the commit. I will investigate both of those issue if you attach the file.
*** Bug 624158 has been marked as a duplicate of this bug. ***
Created attachment 173819 [details] [review]
I had originally proposed this patch in bug #624158 comment #1. I somehow forgot to reattach it here as requested, until now. Quoting original comment:
This fix addressed the problem by avoiding coalescing with a CHARS node if
there is a tspan node after it. I'm not sure if this is the ideal patch, or if
dropping this whole coalescing thing would be better. I assume that librsvg
with this patch is better than without it, but even there I'd need more info on
the original Pango issue behind this coalescing idea to know if I'm correct.
This bug has been reported more than two years ago, and a fix has been proposed for over one year. The issue has one duplicate and blocks two others. Any chances someone will review that fix?
We've encountered this bug at Wikipedia, where we use librsvg as a handy embeddable SVG renderer.
I've ported your patch to apply to librsvg 2.34.1 and it seems to help in local testing:
Our downstream bug: <https://bugzilla.wikimedia.org/show_bug.cgi?id=32197>
Created attachment 200720 [details] [review]
Martin's patch updated to apply to 2.34.1
Created attachment 200721 [details]
Sample SVG file from Wikimedia's downstream bug
This file contains some nested <tspan>s for things like gray and italic text; a number of sections get rendered with words out of order as per description in <https://bugzilla.wikimedia.org/show_bug.cgi?id=32197#c2>
Created attachment 200722 [details]
Incorrect rendering of Wikimedia sample SVG, from rsvg 2.34.1
Created attachment 200724 [details]
Corrected rendering of Wikimedia sample image, with rsvg 2.34.1 plus updated version of Martin's patch
I committed the patch to master. Let's hold it there for a bit and see if any regressions turn up, before we add it to the stable branch.
(In reply to comment #13 by chpe)
> I committed the patch to master. Let's hold it there for a bit and see if any
> regressions turn up, before we add it to the stable branch.
chpe: One year after: Any regressions, or can this be added (in case this still makes sense and master hasn't become new stable already anyway)?
Or is this just RESOLVED FIXED nowadays?
This is in stable 2.40.0 release.