Support the 'text-decoration' property in SVG (underline, etc.)

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
12 years ago
4 years ago

People

(Reporter: jonathan chetwynd, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
wanted1.9.2 -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Input], URL)

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
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
(Reporter)

Comment 1

12 years ago
Created attachment 203724 [details]
text with underline in css style sheet

Comment 2

11 years ago
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
(Reporter)

Updated

11 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

11 years ago
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
(Reporter)

Comment 4

11 years ago
#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 :-(
Summary: text-decoration: underline not displayed → text-decoration broken: no underline, line thru, etc

Comment 5

10 years ago
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

10 years ago
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.
(Reporter)

Comment 7

10 years ago
Brian,

what's the delay on this? this bug is coming up for 2 years old ~:"

Comment 8

10 years ago
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

10 years ago
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

10 years ago
Confirmed - see Wikimedia bug report 

https://bugzilla.wikimedia.org/show_bug.cgi?id=13581

Comment 11

9 years ago
can we have this fixed for FF3.0 final please?

Updated

9 years ago
Duplicate of this bug: 444311
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
Flags: wanted1.9.2?
(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... ;-)
Flags: wanted1.9.2? → wanted1.9.2-
Assignee: general → nobody
QA Contact: ian → general

Updated

8 years ago
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

Updated

8 years ago
Summary: text-decoration broken: no underline, line thru, etc → Support the 'text-decoration' property in SVG (underline, etc.)
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.
Whiteboard: [Input]
(Only one of the comments there -- the one about underline -- is actually related to this bug.)

Updated

7 years ago
Duplicate of this bug: 604309

Updated

7 years ago
Duplicate of this bug: 608228

Comment 20

7 years ago
Sent this to w3c some time ago without response. http://lists.w3.org/Archives/Public/www-svg/2009Oct/0010.html
(Reporter)

Comment 21

7 years ago
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

7 years ago
> 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

7 years ago
Created attachment 517431 [details]
SVG Text decoration test case

made during "Introduction to SVG" W3C tech course in October 2010

Comment 24

7 years ago
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.
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.
Depends on: 655877

Comment 26

6 years ago
(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?

Updated

6 years ago
Duplicate of this bug: 720854
Duplicate of this bug: 769613
Depends on: 839955

Comment 29

5 years ago
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

4 years ago
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.
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.
Text decorations should now be painted, with bug 655877 and dependants landed.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 33

4 years ago
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.
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

4 years ago
Can we delay Fx 25 for another 2 years ? Then we'll have taken a nice round decade to fix this.

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