SVG text with rotation matrix drawn twice in wrong location

RESOLVED FIXED

Status

Core Graveyard
GFX
RESOLVED FIXED
12 years ago
9 years ago

People

(Reporter: tor, Assigned: Stuart Parmenter)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

(Reporter)

Description

12 years ago
On a build from the night of 3/9, SVG text with a rotation matrix appears to be drawn twice and in the wrong location on win32 with cairo gfx.  In the attached testcase, the text should be placed on the red line.  If you add 'fill-opacity="0.5"' to the <text> element then the text appears in the correct location.
(Reporter)

Comment 1

12 years ago
Created attachment 214731 [details]
testcase - text baseline should be the red line
(Reporter)

Comment 2

12 years ago
Created attachment 214732 [details]
snapshot of result seen on win32
(Assignee)

Comment 3

12 years ago
Created attachment 214738 [details] [diff] [review]
fix for double text rendering

this fixes the double text rendering, but doesn't fix the wrong x/y problem.  the toy text api ends up translating the x/y coordinates for the backend function and then we set the world transform which ends up rotating and translating again.

we really need the backend to get the original numbers here if we're going to use SetWorldTransform for rotations.. not sure what the right fix it -- will look in to it further.
Attachment #214738 - Flags: review?(vladimir)
Attachment #214738 - Flags: review?(vladimir) → review+
(Assignee)

Comment 4

12 years ago
Comment on attachment 214738 [details] [diff] [review]
fix for double text rendering

checked in. leaving open for rotation problems
*** Bug 331324 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 6

12 years ago
Created attachment 218053 [details]
testcase 2 - add outline
(In reply to comment #6)
> Created an attachment (id=218053) [edit]
> testcase 2 - add outline

shaver was mentioning that this was a problem on the mac as well, however:

1.5.0.2: no outline is drawn at all
2.0a*: green outline drawn after the text; that is, I just see the "fo" green outline after the solid black "foobar", but they seems to be rotated correctly
3.0a*: green outline glyphs drawn at correct location, but not rotated
(Reporter)

Comment 8

12 years ago
On OS-X here:

  1.5.0.1 shows the outline around the text as expected

  2.0a1 shows the outline after the text (pretty that's a bug at our end,
     sounds very familiar)

  trunk shows the non-rotated glyphs
(Reporter)

Comment 9

12 years ago
2.0a1 outline positioning is bug 333615.
I'm also seeing a variety of other problems with the second testcase:

 - right-clicking around the general text area shows a green outline and random sections of the black text when the resulting menu is dispelled

 - the green border around the box isn't erased when the page is scrolled, just re-rendered in the new position

As an example, see http://img49.imageshack.us/img49/5017/foobar7xb.gif


Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9a1) Gecko/20060413 Firefox/3.0a1
(Assignee)

Comment 11

12 years ago
Created attachment 220708 [details] [diff] [review]
fix

we need to use the device_to_logical matrix from the scaled font to transform the x/y points
Attachment #220708 - Flags: review?(vladimir)
Attachment #220708 - Flags: review?(vladimir) → review+
(Assignee)

Comment 12

12 years ago
checked in -- fixed.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Depends on: 338624
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.