Page MenuHomePhabricator

SVG rendering: stacked tspan elements rendered in incorrect order
Closed, ResolvedPublic

Description

Author: fut.perf

Description:
When a <text> element in SVG contains several <tspan> elements stacked within each other, the SVG renderer does not render them in correct order. The following SVG fragment:
<pre>
<text x="0" y="150" id="textelement">

<tspan id="outer" style="fill:blue;stroke:none;">
 ABC
 <tspan id="inner" style="fill:red;stroke:none;">
  DEF
 </tspan>
 GHI
</tspan>

</text>
</pre>
should display as "ABC DEF GHI", but instead displays as "ABC GHI DEF". See error report at Wikimedia Commons [http://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard/Attention&diff=prev&oldid=17965457 here], and test on en-wiki [http://en.wikipedia.org/wiki/File:Test_tspan.svg here].


Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/wiki/File:Test_tspan.svg

Details

Reference
bz17174

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:28 PM
bzimport set Reference to bz17174.
bzimport added a subscriber: Unknown Object (MLST).

river wrote:

MediaWiki doesn't render SVGs. this would be an rsvg bug.

fut.perf wrote:

Where would I report that then?

fut.perf wrote:

Okay, can anybody confirm what version of rsvg we are currently using at wikimedia.org? The rsvg 2.18.2 I downloaded on my local computer didn't reproduce the bug.

brion added a comment.Aug 3 2009, 4:53 PM

Assigning SVG bugs to Ariel -- need a cleanup pass to see what's fixed up by a librsvg upgrade, what can be resolved with fixes to our font configuration, what can be fixed on our end, and what still needs to be pushed upstream.

camjsb7j9g wrote:

To test whether the svg renderer has changed from when this bug was reported I have today re-uploaded http://en.wikipedia.org/wiki/File:Test_tspan.svg as http://en.wikipedia.org/wiki/File:Test_tspan_uploaded_20100613.svg but it seems it still renders incorrectly.

TheDJ added a comment.Nov 4 2010, 4:26 AM
  • Bug 22698 has been marked as a duplicate of this bug. ***
TheDJ added a comment.Nov 4 2010, 4:30 AM
  • Bug 24349 has been marked as a duplicate of this bug. ***

Martin.vGagern wrote:

Upstream bug https://bugzilla.gnome.org/show_bug.cgi?id=581108 has a patch by me.

giving SVG bugs back to the pool.

TheDJ added a comment.Dec 4 2011, 1:25 PM

patch applied upstream.

TheDJ added a comment.Dec 4 2011, 9:42 PM

Either the patch is not in our recent update of librsvg yet, or the patch does not fix the issue in the report, because the test image still shows the problem.

brion added a comment.Dec 4 2011, 10:37 PM

The patch has not been deployed on our servers, nor is it yet in a release version. (It's in upstream git master.)

TheDJ added a comment.Oct 26 2012, 9:27 AM

This issue is fixed now. Testcase http://en.wikipedia.org/wiki/File:Test_tspan.svg is rendered correctly.