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
ReferenceSource BranchDest BranchAuthorTitle
repos/releng/release!10tarball-echo-plusmasterjforresterAdd Echo, LoginNotfiy, and Thanks to the default MediaWiki bundle
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.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.

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.

  • Bug 22698 has been marked as a duplicate of this bug. ***
  • Bug 24349 has been marked as a duplicate of this bug. ***

giving SVG bugs back to the pool.

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.

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