Page MenuHomePhabricator

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

Description

Author: FT2.wiki

Description:
Compare:

http://en.wikipedia.org/wiki/Image:BLP_flowchart_2.svg
and
http://upload.wikimedia.org/wikipedia/en/thumb/f/f0/BLP_flowchart_2.svg/370px-BLP_flowchart_2.svg.png

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:
https://bugzilla.gnome.org/show_bug.cgi?id=524433

Details

Reference
bz13495

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:03 PM
bzimport set Reference to bz13495.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 24 2008, 8:58 PM

FT2.wiki 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"?>
<!DOCTYPE svg PUBLIC "-W3CDTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="500" height="450" version="1.1" xmlns="http://www.w3.org/2000/svg">

<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>
</text>

</svg>

Likewise the SVG demo for underlining at this page: http://www.svgbasics.com/font_effects_bold.html 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)

Attached:

brion added a comment.Mar 25 2008, 5:45 PM

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

FT2.wiki 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.

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.

giving SVG bugs back to the pool.

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

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

TheDJ added a comment.Oct 26 2012, 8:53 AM

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

Attached:

TheDJ added a comment.Oct 26 2012, 8:56 AM

I accidentally closed the wrong ticket here. The issue is still visible in the earliest revision of the file
http://en.wikipedia.org/wiki/Image:BLP_flowchart_2.svg

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.