Page MenuHomePhabricator

SVG text-decoration (including underlining) doesn't render
Closed, ResolvedPublic




Code being used: <tspan text-decoration="underline"> ... </tspan>

(Note - may have other flaws in Gecko/Firefox. Underlining bug is visible in IE6 and Opera 9 at minimum.)

Version: unspecified
Severity: normal
See Also:



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:03 PM
bzimport set Reference to bz13495.
bzimport added a subscriber: Unknown Object (MLST). wrote:

test case

Further example: The following SVG code (SVG attached) will render in Opera and IE6 as three underlined texts, but rsvg ignores the underline attribute in all 3 lines:

<?xml version="1.0" standalone="no"?>

<svg width="500" height="450" version="1.1" xmlns="">

<text style="font-size:14px;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Arial">
   <tspan x="20" y='20' text-decoration="underline">Underline me!</tspan>
   <tspan x="50" y='40' style="text-decoration:underline">Underline me!</tspan>
   <tspan x="70" y='60'>The following text is <tspan text-decoration="underline">underlined</tspan>.</tspan>


Likewise the SVG demo for underlining at this page: if saved as an SVG file, doesnt render any of the text decoration that the tutorial says should render, although if opened in IE or Opera as an SVG it does. (Note - you have to remove the "contentScriptType=text/ecmascript" to get mediawiki to upload it)


Note that IE 6 does not support SVG. Anything that renders for you in IE 6 is actually some sort of third-party plugin. wrote:

Indeed, technically it's the Adobe SVG add-on, which is pretty much a run-of-mill standard for svg rendering on IE. Apologies for the inaccuracy.

I meant to say that it renders correctly on both the adobe plugin, and opera, which are what I have available to test on.

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.

giving SVG bugs back to the pool.

This issue seems fixed after the recent librsvg update and then purging the file in question. Also reported as no longer reproducing upstream in librsvg 2.31.0

Created attachment 11246
Diff of the changes between revision 1 and revision 2


I accidentally closed the wrong ticket here. The issue is still visible in the earliest revision of the file

Diff between the two files is attached

There's a comment on the upstream bug saying cannot reproduce - someone may want to check in with them.

This bug seems fixed. The last report seems a cache issue also the attached diff shows only text change, also the earliest revision shows underline as it should.