Closed Bug 1084029 Opened 10 years ago Closed 1 year ago

SVG Text rendering to wrong size when scale factors are changed

Categories

(Core :: SVG, defect)

33 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: thomas.smailus, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141011015303

Steps to reproduce:

Created a simple SVG diagram with some text in it.
When the 'scale' portion of the text element is modified, the resulting text scales as expected.
Text with the same dimensions, scaled by the same amount, that is hardcoded in the SVG file as such, should display as the same size, but it does not - it is vastly taller text that is rendered.


Actual results:

Text described in the SVG with a given scale factor displays as much taller, vs seperate identical text content that has its scale factor adjusted to the same amount via embedded javascript code.
The bounding box information for both text items - of different sizes, indicates the two are the same height and width - which they are visibly not.


Expected results:

The two text samples should look the same size - whether they originate with a scale factor, or have that scale factor applied programatically.
The running script logs out dimension information to the console; enable the debugging console when viewing the attached SVG sample diagram to see it.
Severity: normal → critical
The text items should fit INSIDE the red rectangles that are also on the images.  
The resized-by-code BLACK text does, the initially scaled to the same scale GREEN text does not.

This test case was produced because I found that while my initial adjustment of scaling did size the text to fit the region I intended (as depicted by the BLACK text), subsequent transforms applied to the diagram (changing rotation or scale at a higher document level) would distort the text in the height dimension at unexpected but reproducible times.

This does not happen with other diagrams I have used, that have a different coordinate space extent - I am suspecting it is related to the very large coordinate space extents used in this diagram and that not being handled cleanly in FireFox.
Severity: critical → normal
Component: Untriaged → SVG
Keywords: testcase
Product: Firefox → Core
Severity: normal → S3

getBBox does not change with the element's transform. You're not therefore changing the scale and the firefox result is correct.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: