SVG tspan rendering using ems doesn't render properly

RESOLVED DUPLICATE of bug 305859

Status

()

Core
SVG
RESOLVED DUPLICATE of bug 305859
11 years ago
10 years ago

People

(Reporter: David Lodge, Unassigned)

Tracking

1.8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Opera/9.22 (Windows NT 5.1; U; en)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

If ems are used as the dy in <tspan> elements, the dy is ignored and the two lines are rendered over each other. See the below example.

The first rectangle has the two lines separated, the second has them all rendered on the same line. If this is compared with the Adobe SVG viewer, Opera or Batik all should be rendered with a proper spacing.

<g transform="translate(400,100)">
   <rect rx="2" ry="2" width="86" height="56" stroke="black" fill="white" />
   <text x="43" y="14" text-anchor="middle">
      <tspan x="43" dy="5">Wibble</tspan>
      <tspan x="43" dy="15">Aardvark</tspan></text>
</g>
<g transform="translate(400,200)">
   <rect rx="2" ry="2" width="86" height="56" stroke="black" fill="white" />
   <text x="43" y="14" text-anchor="middle">
      <tspan x="43" dy="0em">Wibble</tspan>
      <tspan x="43" dy="1.5em">Aardvark</tspan></text>
</g>

Reproducible: Always

Steps to Reproduce:
1. Put the above SVG in a file and load it into Firefox
Actual Results:  
All the tspans separated by ems are mangled together

Expected Results:  
There should be a 1.5em gap around the characters.
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.8 Branch
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 305859
You need to log in before you can comment on or make changes to this bug.