Awry text rendering on canvas using hardware acceleration

VERIFIED FIXED in Firefox 8

Status

()

Core
Graphics
VERIFIED FIXED
6 years ago
4 years ago

People

(Reporter: Stanimir Stamenkov, Assigned: bas)

Tracking

Trunk
mozilla10
x86_64
Windows 7
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(firefox8 fixed, firefox9 fixed)

Details

(Whiteboard: [qa!])

Attachments

(4 attachments)

(Reporter)

Description

6 years ago
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111001 Firefox/10.0a1

STR: Open http://mercurial.selenic.com/ and observe headings.

Actual: Characters in headings look awry.

Expected: "Smooth" characters as seen with Firefox 6 and other browsers like IE 9, Safari 5.1 and Chrome 15 beta.

Turning the hardware acceleration off seems to correct the issue.

Last good build:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2011/06/2011-06-25-03-07-43-mozilla-central/firefox-7.0a1.en-US.win32.zip

First bad build:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2011/06/2011-06-26-03-07-56-mozilla-central/firefox-7.0a1.en-US.win32.zip

Regression range:

http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2011-06-25&enddate=2011-06-27
(Reporter)

Comment 1

6 years ago
Created attachment 564039 [details]
Awry text rendering

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110626 Firefox/7.0a1
(Reporter)

Comment 2

6 years ago
Created attachment 564040 [details]
Correct text rendering

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110625 Firefox/7.0a1

Comment 3

6 years ago
Likely regression from bug 651858.
Blocks: 651858
Component: Canvas: WebGL → Graphics
QA Contact: canvas.webgl → thebes
Azure isn't used to render HTML content, so that regression cause looks unlikely...
Looks like the site is using a JS library "typeface-0.15.js" that renders text using fonts defined in JS by drawing them to canvas (in this case, an Optima "clone" called "optimer_regular.typeface.js"), so the suggested regression _does_ sound plausible after all.

Comment 6

6 years ago
This is rather bad (visual) regression.
Setting some flags...
tracking-firefox10: --- → ?
tracking-firefox8: --- → ?
tracking-firefox9: --- → ?
(Assignee)

Comment 7

6 years ago
This almost looks as if the flattening tolerance on the path is too high or something. A reduced canvas-only testcase would help a lot in diagnosing this.
Assignee: nobody → bas.schouten

Comment 8

6 years ago
Created attachment 564536 [details]
testcase using typeface.js

Problem occurs on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

That's some ugly looking text...
Test case also replicates for me on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
(Assignee)

Comment 10

6 years ago
I've found the root cause of this issue, fix coming up.
(Assignee)

Comment 11

6 years ago
Created attachment 565912 [details] [diff] [review]
Use proper coordinates when adding a device space quadratic curve

This fixes the issue that causes this.

Quite likely this bug can be worked around by moving the 'restore()' call in renderWord to before 'beginPath()' this would also improve the performance of the library.
Attachment #565912 - Flags: review?(roc)
Comment on attachment 565912 [details] [diff] [review]
Use proper coordinates when adding a device space quadratic curve

Review of attachment 565912 [details] [diff] [review]:
-----------------------------------------------------------------

oopsie
Attachment #565912 - Flags: review?(roc) → review+

Updated

6 years ago
tracking-firefox10: ? → ---
tracking-firefox8: ? → ---
tracking-firefox9: ? → ---

Comment 13

6 years ago
Comment on attachment 565912 [details] [diff] [review]
Use proper coordinates when adding a device space quadratic curve

The release team won't be tracking this but please land the fix on Aurora and Beta.
Attachment #565912 - Flags: approval-mozilla-beta+
Attachment #565912 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 14

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9975c3dd08a6
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Comment 15

6 years ago
Forgot this is only on inbound. Sorry for bugspam.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/9975c3dd08a6
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
How hard would this be to test?
Flags: in-testsuite?
(Assignee)

Comment 18

6 years ago
(In reply to Ms2ger from comment #17)
> How hard would this be to test?

Very easy, but considering the rather coincidental circumstances that surround this bug I'm not sure a test case would be that useful.

We actually test all the individual facets of this bug, just not the combination.

Comment 19

6 years ago
I thought this has to be landed on beta and aurora? (Comment 13)

Comment 20

6 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/5016fa65673e
http://hg.mozilla.org/releases/mozilla-beta/rev/e38378366d23
status-firefox8: --- → fixed
status-firefox9: --- → fixed

Comment 21

6 years ago
I tested to see if the issue is still visible after the landing of the fix; I took as example the testcare using  typeface.js in the attachment and got the following results:
Verified Fixed on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 (Beta)
 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a2) Gecko/20111019 Firefox/9.0a2 (Aurora)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111020 Firefox/10.0a1 (Nightly)

Since the issue (as it was reported in the Description) is not visible anymore after the landing of the fix, on all branches, setting this bug's resolution to Verified and the whiteboard entry to qa!
Status: RESOLVED → VERIFIED

Updated

6 years ago
Whiteboard: [qa!]
You need to log in before you can comment on or make changes to this bug.