Canvas elements rendering Cufon text are corrupted on Win64

RESOLVED WORKSFORME

Status

()

Core
Canvas: 2D
RESOLVED WORKSFORME
8 years ago
3 years ago

People

(Reporter: bugzilla, Unassigned)

Tracking

Trunk
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(4 attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b12pre) Gecko/20110216 Firefox/4.0b12pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b12pre) Gecko/20110216 Firefox/4.0b12pre

Noticed it on a few sites;

http://www.institute.nhs.uk/quality_and_value/high_volume_care/focus_on%3A_productivity_and_efficiency.html
http://www.homeswapper.co.uk/links/landlords.asp

Reproducible: Always

Steps to Reproduce:
1.Visit site
2.look at text
3...
(Reporter)

Comment 1

8 years ago
Created attachment 513196 [details]
screenshot1
(Reporter)

Comment 2

8 years ago
Created attachment 513197 [details]
screenshot2
Does setting "gfx.direct2d.disabled" to "true" + a Restart of Fx change anything?
(Reporter)

Comment 4

8 years ago
> Does setting "gfx.direct2d.disabled" to "true" + a Restart of Fx change
anything?

No difference.
Ok, how about Safe-Mode and/or using the 32-Bit Version of a Fx Nightly?
I fail to see the Issue on Mozilla/5.0 (Windows NT 5.1; rv:2.0b12pre) Gecko/20110217 Firefox/4.0b12pre ID:20110217030357.
(Reporter)

Comment 6

8 years ago
Done some more testing. This only occurs on 64bit minefield.
(Reporter)

Comment 7

8 years ago
Created attachment 513308 [details]
video capture when hitting refresh

The image is displayed correctly initially, but some post-processing corrupts it.
Weird, almost looks like the shaper (?) gave up half way though, connected a path back to the origin, and resulted in a weird inversion of the glyph as a result.
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Note that the metrics change, too, which is a clue that the initial (un-mangled) display is actually a fallback font, and then we're re-rendering with the "real" font (but the image is garbled).

These pages are using Cufon, which actually implements "web fonts" by dynamically replacing the textual elements on the page with <canvas>es and drawing the text there. So I think this is most likely a <canvas> bug when running on Win64.
Component: Graphics → Canvas: 2D
QA Contact: thebes → canvas.2d
Summary: PNG images of text are badly corrupted → Canvas elements rendering Cufon text are corrupted on Win64

Comment 10

8 years ago
I can confirm this still exists on "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b13pre) Gecko/20110309 Firefox/4.0b13pre".

Here is another site using Cufon where this occurs: http://www.mecu.org/ .

Also, http://www.redbox.com/movies has the same corruption issue for the navigation buttons using javascript font rendering.  However, visiting http://www.redbox.com/movies#genre=comedy seems to make the text work.

Comment 11

8 years ago
Created attachment 518980 [details]
test case showing issue with drawing bezier curves

It seems that after creating about 71-72 paths which involve bezier curves (bezierCurveTo), the endpoint of the drawn curve becomes (0,0) instead of the real endpoint (including updating the canvas' state to this point).

It does not seem to matter if the curves are drawn on separate canvases or not.  It also doesn't seem to affect lineTo.

I have attached a simple test case which draws 100 curves after clicking a button.  You should be able to see after the 71st or so curve, the endpoints become (0,0).  It may be different on different machines.  You can click the draw button again to clear the canvas and draw some more.  After drawing a few hundred curves on my machine, they all have endpoints of (0,0).
> It seems that after creating about 71-72 paths which involve bezier curves
> (bezierCurveTo), the endpoint of the drawn curve becomes (0,0) instead of the
> real endpoint (including updating the canvas' state to this point).

CC'ing Jeff just in case that might be a Cairo bug.

Comment 13

7 years ago
http://www.ultimatesolarsolutions.com.au/
Here is another example of a site destroyed by this bug. 

Firefox Minefield 64 Win, 2D Direct on

Seems to start at the 7-10 character. I hope this is on the fix list as the technology is being widely deployed.

Comment 14

3 years ago
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:39.0) Gecko/20100101 Firefox/39.0
Built from https://hg.mozilla.org/mozilla-central/rev/840cfd5bc971

I can't reproduce this in the latest 64-bit Nightly on Windows 7, either with the attached testcase or the aforementioned sites. Please retest with the latest 64-bit Nightly [1] in a brand new profile [2]. If you're still seeing the issue then, feel free to reopen this bug report.
[1] https://nightly.mozilla.org
[2] https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.