Last Comment Bug 317196 - Support the 'text-decoration' property in SVG (underline, etc.)
: Support the 'text-decoration' property in SVG (underline, etc.)
Status: RESOLVED FIXED
[Input]
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal with 22 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
http://www.w3.org/Graphics/SVG/Test/2...
: 444311 604309 608228 720854 769613 (view as bug list)
Depends on: svgtext 839955
Blocks: svg11tests
  Show dependency treegraph
 
Reported: 2005-11-20 09:44 PST by jonathan chetwynd
Modified: 2013-09-04 12:01 PDT (History)
32 users (show)
roc: wanted1.9.2-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
text with underline in css style sheet (485 bytes, image/svg+xml)
2005-11-20 09:45 PST, jonathan chetwynd
no flags Details
SVG Text decoration test case (2.96 KB, image/svg+xml)
2011-03-07 08:14 PST, Camille Bissuel
no flags Details

Description jonathan chetwynd 2005-11-20 09:44:18 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

text is not underlined though CSS rule says it should be

Reproducible: Always

Steps to Reproduce:
1.load attachment
2 [review].
3.

Actual Results:  
text is not underlined

Expected Results:  
text is underlined
Comment 1 jonathan chetwynd 2005-11-20 09:45:10 PST
Created attachment 203724 [details]
text with underline in css style sheet
Comment 2 Jaroslav Zaruba 2006-07-02 10:01:59 PDT
It appears to me that text-decoration doesn't work at all (not only 'underline').
Here's a test SVG from W3.org:
http://www.w3.org/TR/SVG/images/text/textdecoration01.svg
Comment 3 Duncan Loveday 2007-03-23 17:17:35 PDT
text-decoration is also ignored on the recent nightly trunk builds of FF3. The status page at http://www.mozilla.org/projects/svg/status.html states that "text" is implemented and does not list text-decoration as an exception. Voting for this because it is a widely used feature that ought to work, much more important than obscure filters/user defined fonts etc
Comment 4 jonathan chetwynd 2007-03-23 23:53:28 PDT
#3 thanks for reminding me!

Baz please excuse me CCing you into this bug.

from an accessibility perspective this is awful.

figure the solution should be simple and part of <text>

over 12 months old :-(
Comment 5 Bruce Rindahl 2007-06-27 20:30:07 PDT
Works in Opera, IE/ASV, and Safari.

Jonathan - Do comments like the above help or hurt in getting support for SVG from Mozilla Corp?
Comment 6 Duncan Loveday 2007-06-28 14:34:50 PDT
IMHO if this is not going to be addressed any time soon then the information at http://www.mozilla.org/projects/svg/status.html  should be changed.
Comment 7 jonathan chetwynd 2007-09-02 10:23:41 PDT
Brian,

what's the delay on this? this bug is coming up for 2 years old ~:"
Comment 8 Brian Ewins 2007-09-02 14:37:16 PDT
jonathan - you'd be better having a conversation on irc, #svg. I don't know the details on this one, but AFAIK its not a cairo bug. 

Historically, moz-svg and gfx had different ways of selecting and decorating glyphs; moz-svg used the 'toy' cairo api, which led to the bugs where it selected random font faces on the mac, while the gfx code did extra work (beyond the scope of cairo) to do font and glyph selection. As I understood it, moz-svg planned to move to using the gfx code to select fonts, which would resolve part of the problem. I believe the underscores are then added synthetically, rather than using the underlying font rendering system (and this is why there used to be bugs in ff3/mac wrt spacing between words and underscores).

However, none of that is happening in the cairo code, so I'm not in a position to help, and I'm not close enough to mozilla development to tell you who can, which is why I previously didn't comment on this bug. However, I have noticed that some of the old atsui stuff in the code has gone, so there may have been progress in the nightlies.

Comment 9 tor 2007-09-04 12:10:03 PDT
We have switched over to using gfx to select fonts, which solved a number of text related problems.  Text decorations need to be drawn separately, and haven't been implemented yet.
Comment 10 FT2 2008-04-01 12:05:03 PDT
Confirmed - see Wikimedia bug report 

https://bugzilla.wikimedia.org/show_bug.cgi?id=13581
Comment 11 liucougar 2008-06-05 11:04:33 PDT
can we have this fixed for FF3.0 final please?
Comment 12 Robert Longson 2008-07-09 04:49:27 PDT
*** Bug 444311 has been marked as a duplicate of this bug. ***
Comment 13 Helder "Lthere" Magalhães 2009-03-03 03:28:58 PST
Confirmed with latest stable (3.0.6 [1]) and a nightly build (3.2a [2]) -- unfortunately, I'm not able to change the bug's status (to confirmed, which seemed appropriate).

Tentatively adding the "wanted1.9.2" flag to call for attention. I'm sure users would love this in time for Firefox 3.1 final ("wanted1.9.1" flag) but, given the already advanced status if (beta 2 [3], as of this writing), I'd say that it was a bit pushy.

By the way, in "Steps to Reproduce", the link (and title) Bugzilla creates are to be ignored -- due to the lack of punctuation in the sentence, Bugzilla is interpreting a mix of steps 1 and 2 as attachment 2 [details] [diff] [review] which is obviously not the intended result.

[1] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
[2] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090302 Minefield/3.2a1pre
[3] http://www.mozilla.com/en-US/firefox/all-beta.html
Comment 14 Helder "Lthere" Magalhães 2009-03-03 03:48:25 PST
(In reply to comment #13)
> unfortunately, I'm not able to change the bug's status (to confirmed, which
> seemed appropriate).

Never mind this part of the comment, it was a brief lapse of attention! :-D  Of course the issue is already confirmed... ;-)
Comment 15 Jonathan Watt [:jwatt] (back in October - email directly if necessary) 2009-08-25 16:30:01 PDT
This bug needs to be fixed for us to pass the following tests from the W3C SVG Full 1.1 testsuite:

http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-text-deco-01-b.html
http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-text-text-03-b.html
Comment 16 Aakash Desai [:aakashd] 2010-07-21 13:39:35 PDT
We're seeing a couple of instances of issues with SVG and text located here - http://input.mozilla.com/en-US/search/?q=SVG+text&product=firefox

I believe most are related to this bug.
Comment 17 Daniel Holbert [:dholbert] 2010-07-21 14:14:13 PDT
(Only one of the comments there -- the one about underline -- is actually related to this bug.)
Comment 18 Robert Longson 2010-10-14 01:51:54 PDT
*** Bug 604309 has been marked as a duplicate of this bug. ***
Comment 19 Robert Longson 2010-10-29 03:56:30 PDT
*** Bug 608228 has been marked as a duplicate of this bug. ***
Comment 20 Robert Longson 2011-01-16 09:07:55 PST
Sent this to w3c some time ago without response. http://lists.w3.org/Archives/Public/www-svg/2009Oct/0010.html
Comment 21 jonathan chetwynd 2011-01-16 09:53:08 PST
Robert,

you might either forward again, marking 2nd call, or file a w3c bug,

afaict, a response is not needed for the vanilla case, which remains to be implemented.
Comment 22 Duncan Loveday 2011-01-17 01:37:10 PST
> afaict, a response is not needed for the vanilla case

I too would be "delighted" to see text-decoration, especially underline for simple cases not involving rotation, text path etc.
Comment 23 Camille Bissuel 2011-03-07 08:14:46 PST
Created attachment 517431 [details]
SVG Text decoration test case

made during "Introduction to SVG" W3C tech course in October 2010
Comment 24 Eric Warnke 2011-04-03 22:38:16 PDT
In six years how has this not been implemented? This is a basic tag that is essential to SVG rendering. The other big three browsers support text-decoration.
Comment 25 Cameron McCormack (:heycam) 2011-04-06 14:03:25 PDT
There is a plan to change Gecko's SVG text support to reuse a lot of the machinery that is used for regular CSS/HTML text.  Getting text-decoration to work with SVG text will probably be fixed as part of that.
Comment 26 BUON Jean-Guy 2011-05-09 16:37:18 PDT
(In reply to comment #25)
> There is a plan to change Gecko's SVG text support to reuse a lot of the
> machinery that is used for regular CSS/HTML text.  Getting text-decoration
> to work with SVG text will probably be fixed as part of that.

An estimated time of implementation is possible?
Comment 27 Robert Longson 2012-01-29 03:32:36 PST
*** Bug 720854 has been marked as a duplicate of this bug. ***
Comment 28 Daniel Holbert [:dholbert] 2012-06-29 14:07:39 PDT
*** Bug 769613 has been marked as a duplicate of this bug. ***
Comment 29 Citron 2013-03-15 01:11:15 PDT
The ticket dates from nearly 8 years.
The problem is still here on Firefox 19.0.2.
See 
http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-text-deco-01-b.html
for conformance.
Please help as SVG is finally raising and webkit renders it well.
Comment 30 Ron MacCracken 2013-03-28 18:03:42 PDT
I agree - bold and italic text work fine, but underline still does not. We wrote a powerpoint like SVG editor, but have to tell our customers that underline just doesn't work in Firefox. If there is no plan to support it, then please let us know so I can try to draw the lines myself. I would obviously rather not do this, but the issue keeps coming up with each new Firefox release not supporting it.
Comment 31 Cameron McCormack (:heycam) 2013-03-28 18:34:39 PDT
Bug 839955 is the bug that will turn on the new SVG text support (the majority of work for which was done in bug 655877), which will get text decorations working.  The dependent bugs off that one need to be fixed first.
Comment 32 Cameron McCormack (:heycam) 2013-06-29 17:54:33 PDT
Text decorations should now be painted, with bug 655877 and dependants landed.
Comment 33 Auk14HP 2013-09-04 10:47:45 PDT
Bug still seems to be an issue.  Using Firefox 23.0.1, if I load the attachments included in the original case description, the text is still not underlined.
Comment 34 Daniel Holbert [:dholbert] 2013-09-04 11:00:20 PDT
That's expected; it's turned off with a preference, and the first release with that preference enabled will be Firefox 25.  (See bug 839955, which enables the preference.)
Comment 35 Duncan Loveday 2013-09-04 12:01:06 PDT
Can we delay Fx 25 for another 2 years ? Then we'll have taken a nice round decade to fix this.

Just kidding

Note You need to log in before you can comment on or make changes to this bug.