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 581108 - SVG image does not display correctly
SVG image does not display correctly
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.22.x
Other Linux
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 624158 (view as bug list)
Depends on:
Blocks: 403546 525023
 
 
Reported: 2009-05-02 16:21 UTC by Richard
Modified: 2013-11-15 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Small SVG image which exhibts the described problem (3.34 KB, image/svg+xml)
2009-05-04 21:30 UTC, Richard
  Details
Cautious fix (794 bytes, patch)
2010-11-04 10:39 UTC, Martin von Gagern
none Details | Review
Martin's patch updated to apply to 2.34.1 (511 bytes, patch)
2011-11-04 23:15 UTC, Brion Vibber
none Details | Review
Sample SVG file from Wikimedia's downstream bug (540.99 KB, image/svg+xml)
2011-11-04 23:17 UTC, Brion Vibber
  Details
Incorrect rendering of Wikimedia sample SVG, from rsvg 2.34.1 (134.11 KB, image/png)
2011-11-04 23:18 UTC, Brion Vibber
  Details
Corrected rendering of Wikimedia sample image, with rsvg 2.34.1 plus updated version of Martin's patch (134.13 KB, image/png)
2011-11-04 23:18 UTC, Brion Vibber
  Details

Description Richard 2009-05-02 16:21:33 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!

displays as:

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.
Comment 1 Michael Chudobiak 2009-05-02 16:35:17 UTC
Yes, please attach a sample image.

- Mike
Comment 2 Richard 2009-05-04 21:30:39 UTC
Created attachment 133972 [details]
Small SVG image which exhibts the described problem
Comment 3 Michael Chudobiak 2009-05-04 23:17:34 UTC
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.

- Mike
Comment 4 Hiroyuki Ikezoe 2010-04-11 02:27:38 UTC
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.
Comment 5 Hiroyuki Ikezoe 2010-07-12 19:40:37 UTC
*** Bug 624158 has been marked as a duplicate of this bug. ***
Comment 6 Martin von Gagern 2010-11-04 10:39:48 UTC
Created attachment 173819 [details] [review]
Cautious fix

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.
Comment 7 Martin von Gagern 2011-09-18 17:51:24 UTC
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?
Comment 8 Brion Vibber 2011-11-04 23:13:40 UTC
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:
<https://github.com/brion/librsvg/commits/work>

Our downstream bug: <https://bugzilla.wikimedia.org/show_bug.cgi?id=32197>
Comment 9 Brion Vibber 2011-11-04 23:15:59 UTC
Created attachment 200720 [details] [review]
Martin's patch updated to apply to 2.34.1
Comment 10 Brion Vibber 2011-11-04 23:17:46 UTC
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>
Comment 11 Brion Vibber 2011-11-04 23:18:20 UTC
Created attachment 200722 [details]
Incorrect rendering of Wikimedia sample SVG, from rsvg 2.34.1
Comment 12 Brion Vibber 2011-11-04 23:18:53 UTC
Created attachment 200724 [details]
Corrected rendering of Wikimedia sample image, with rsvg 2.34.1 plus updated version of Martin's patch
Comment 13 Christian Persch 2011-11-07 20:39:59 UTC
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.
Comment 14 Brion Vibber 2011-11-08 00:03:53 UTC
Thanks!
Comment 15 André Klapper 2013-11-15 11:18:52 UTC
(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?
Comment 16 Christian Persch 2013-11-15 13:17:51 UTC
This is in stable 2.40.0 release.