vertical writing does not work in SVG

RESOLVED FIXED

Status

()

Core
SVG
RESOLVED FIXED
12 years ago
2 years ago

People

(Reporter: Ivan Herman, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug, {testcase})

Trunk
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

The title and the SVG file tells it all...

Reproducible: Always

Updated

12 years ago
Assignee: nobody → general
Component: General → SVG
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch

Updated

12 years ago
Keywords: testcase

Comment 1

12 years ago
Dupe of bug 145503 I think.
*** Bug 360689 has been marked as a duplicate of this bug. ***

Comment 3

11 years ago
*** Bug 330082 has been marked as a duplicate of this bug. ***
Version: 1.8 Branch → Trunk
Status: UNCONFIRMED → NEW
Depends on: 145503
Ever confirmed: true
Duplicate of this bug: 447949
Assignee: general → nobody
QA Contact: ian → general

Comment 7

3 years ago
Created attachment 8515419 [details]
Minimized test with <g writing-mode="tb" glyph-orientation-vertical="0">

Test emulates 'text-orientation: upright'. 
Opera 12.16 and Chrome 38.0.2125.111 pass this test. 
Firefox 33 fails this test.

Comment 8

3 years ago
Created attachment 8515420 [details]
Minimized test with <g writing-mode="tb">

Test emulates 'text-orientation: sideways-right'.
Opera 12.16 and Chrome 38.0.2125.111 pass this test. 
Firefox 33 fails this test.
Note that we do partially support vertical text in SVG if you use CSS styling with writing-mode:vertical-{lr,rl} in place of the SVG writing-mode attribute.

I say "partially" because in a trivial testcase, I see at least one problem: although the text renders vertically, we treat it as though its bounding rect were still horizontal, and therefore it's impossible to select more than the first character or two of the line (i.e. within the bounds of the imaginary horizontal line).
And CSS text-orientation:upright seems to fail altogether: the text disappears.
Do we want to get vertical text in SVG working before turning the pref on?  Or should we explicitly disable those properties for SVG text until we do support it?
Flags: needinfo?(jfkthame)
Depends on: 1153510
I don't see the text disappearing with text-orientation:upright (although I'm testing with the patch in bug 1153510 applied). I can't select the last character of the text with text-orientation:upright though.
(In reply to Cameron McCormack (:heycam) from comment #11)
> Do we want to get vertical text in SVG working before turning the pref on? 
> Or should we explicitly disable those properties for SVG text until we do
> support it?

I'd be willing to turn the pref on without SVG support, but I think we're close enough that the issue needn't arise; with just a couple of small fixes, it'll be usable enough to ship.

One question I have is whether we should try to map the SVG writing-mode and glyph-orientation attributes to the CSS properties that we're implementing, or are we going to tell authors that we only support vertical text via the CSS route?

(In reply to Robert Longson from comment #12)
> I don't see the text disappearing with text-orientation:upright (although
> I'm testing with the patch in bug 1153510 applied). I can't select the last
> character of the text with text-orientation:upright though.

Agreed, with that patch the "disappearing" problem seems to be gone. Additional comments in bug 1153510.
Flags: needinfo?(jfkthame)
(In reply to Jonathan Kew (:jfkthame) from comment #13)
> I'd be willing to turn the pref on without SVG support, but I think we're
> close enough that the issue needn't arise; with just a couple of small
> fixes, it'll be usable enough to ship.

That sounds good then, let's get it working in time for the preffing on.

> One question I have is whether we should try to map the SVG writing-mode and
> glyph-orientation attributes to the CSS properties that we're implementing,
> or are we going to tell authors that we only support vertical text via the
> CSS route?

Support for SVG 1.1's writing-mode/glyph-orientation-{horizontal,vertical} properties are is spotty enough across other implementations that we should just move ahead with supporting CSS' writing-mode/text-orientation properties.  In the SVG 2 spec we'll be removing SVG's definitions and referencing the CSS properties.
Depends on: 1156366
Depends on: 1158500

Updated

3 years ago
See Also: → bug 1162418
The dependencies are all fixed now. vertical writing-mode is supported. The SVG testsuite tests don't work that well as they use a mapped glyph-orientation which has been dropped from SVG 2 in favour of unmapped text-orientation.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.