textLength on SVG <text> elements should adjust dx on child <tspan> elements

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
5 years ago
5 years ago

People

(Reporter: john, Unassigned)

Tracking

26 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 8347320 [details]
tspan.svg

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131205075310

Steps to reproduce:

Create an SVG <text> element with textLength set, then add a child <tspan> element with its dx attribute set. Here's a test case:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
  <style>
    text { font: 20px Verdana }
    tspan { fill: red; font-weight: bold }
  </style>
  <text x="15" y="30">You are 
    <tspan dx="10">not</tspan> 
    a banana
  </text>
  <rect x="15" y="37" width="230" height="3" fill="green"/>
  <text x="15" y="60" textLength="230">You are 
    <tspan dx="10">not</tspan> 
    a banana
  </text>
</svg>


Actual results:

The space contributed by the dx is not adjusted.


Expected results:

The spacing contributed by the dx should be adjusted proportionally, i.e. a dx which represents 10% of its parent <text> element's width should represent 10% of that width after the parent <text> element is adjusted.

Right now, this is implemented correctly in the other major browsers, namely:

* IE 9
* Chrome 31
* Safari 7
(Reporter)

Updated

5 years ago
OS: Mac OS X → All
Hardware: x86 → All
Component: Untriaged → SVG
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.