Closed Bug 551405 Opened 11 years ago Closed 10 years ago

mozTextAlongPath stops rotating along mozPathText


(Core :: Canvas: 2D, defect)

Not set





(Reporter: info, Unassigned)




(Whiteboard: [qawanted: need reftest reduced from vlad's demo])


(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a3pre) Gecko/20100309  Minefield/3.7a1pre
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a3pre) Gecko/20100309  Minefield/3.7a1pre ID:20100309031021 has a screenshot of a canvas example "showing how text can be drawn along a path, which itself is generated by text".  When I view the example the letter glyphs follow the text outline but "soon after the beginning" they are all upright.

Reproducible: Always

Steps to Reproduce:
1. Visit
2. Compare with screenshot in
Actual Results:  
The gray letters along the path are all upright, except the 'T' at the start ("The Internet is becoming..."), does match the path. (I'll attach screenshot.)

Expected Results:  
Letters rotate to match the path, e.g. around the 'o' and along the diagonal of 'z'.  See screenshot in Vladimir's blog.

In other path text examples from bug 339553 like wave text, the letters do rotate to match the angle of the path, hence I think it's some interaction between mozPathText and mozTextAlongPath.

If I change the mozPathText to "ozilla", the letters around the 'o' and part of the 'z' rotate correctly, but after that they're all upright.  Weird.  I tried specifying a different serif font, "FreeSerif", for the text path and got a few more rotated glyphs, but still mostly upright.

It could be something about the way fonts and font rendering on my Linux/Kubuntu 9.04 amd64 system is configured. `fc-match serif` returns 'DejaVuSerif.ttf: "DejaVu Serif" "Book"', which I do have installed. `ldd firefox-bin` reports in part, => /usr/lib/ (0x00007f26a325b000) => /usr/lib/ (0x00007f26a2fd6000) => /usr/lib/ (0x00007f26a2da4000)
This is with one letter removed from ctx.mozPathText(), note how glyphs stop rotating half-way around the 'z'.
bug 518172 (moz-transform doesn't rotate individual characters) occurs in CSS not canvas, but results in a similar visual glitch.  So maybe this bug belongs in Core-Graphics also.
Version: unspecified → Trunk
I can confirm this bug:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a3pre) Gecko/20100315 Minefield/3.7a3pre

I'd say this and bug 518172 are *related*, and may very well be the same root cause, but until that's definitively established, it's worth leaving them separate since the testcases are significantly different from each other.
Ever confirmed: true
(Having said that, Core-Graphics may very well be the right component for this.  Comment 3 was more in response to bug 518172 comment 12)
Mr. Vukićević's sample now works for me, in
Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7pre) Gecko/20101006 Firefox/4.0b7pre

Most likely the fix for bug 518172 , Disable the previous_scaled_font cache , fixed this as well.
As I understand it, ideally there would be a reftest for this bug that now passes, so I am not changing the status to RESOLVED.
This is WFM now too.  Resolving as WORKSFORME with dependency on bug 518172.

Adding whiteboard note & "qawanted" label to hopefully get a reftest (per the last sentence of comment 5).
Closed: 10 years ago
Depends on: 518172
Flags: in-testsuite?
Keywords: qawanted
Resolution: --- → WORKSFORME
Whiteboard: [qawanted: need reftest reduced from vlad's demo]
Issue is resolved - clearing old keywords - qa-wanted clean-up
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.