Closed Bug 319163 Opened 14 years ago Closed 4 years ago

vertical writing does not work in SVG

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: ivan, Unassigned)

References

(Depends on 1 open bug, )

Details

(Keywords: testcase)

Attachments

(2 files)

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
Assignee: nobody → general
Component: General → SVG
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
Keywords: testcase
Dupe of bug 145503 I think.
*** Bug 360689 has been marked as a duplicate of this bug. ***
*** Bug 330082 has been marked as a duplicate of this bug. ***
Version: 1.8 Branch → Trunk
Status: UNCONFIRMED → NEW
Depends on: writing-mode
Ever confirmed: true
Duplicate of this bug: 447949
Assignee: general → nobody
QA Contact: ian → general
Test emulates 'text-orientation: upright'. 
Opera 12.16 and Chrome 38.0.2125.111 pass this test. 
Firefox 33 fails this test.
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
See Also: → 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
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.