SVG text with rotation matrix drawn twice in wrong location



Core Graveyard
12 years ago
9 years ago


(Reporter: tor, Assigned: Stuart Parmenter)


Windows XP

Firefox Tracking Flags

(Not tracked)



(5 attachments)



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.

Comment 1

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

Comment 2

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

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+

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. ***

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: 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

Comment 8

12 years ago
On OS-X here: 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

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

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

Comment 11

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

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+

Comment 12

12 years ago
checked in -- fixed.
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.