Open Bug 843310 Opened 13 years ago Updated 3 years ago

canvas doesn't respect fractional translation with fillText()

Categories

(Core :: Graphics: Canvas2D, defect)

x86
All
defect

Tracking

()

People

(Reporter: soquelspam, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130219201605 Steps to reproduce: When rendering text using fillText() it's not aligned on fractional pixel values according to current transformation made with translate(). This is especially visible during animation. Smooth scrolling is not possible, the text jumps and sticks to pixel boundaries. Please see attached reduction test case which illustrates what should happen (the black line moves correctly) and what is happening (the blue text jerks). As a side note, the same thing happens in Chrome. Only Opera seems to have a correct implementation. Actual results: Text is not correctly rendered in every case. Expected results: Text should be aligned with respect to the current transformation matrix even if it means rendering it on fractional pixels.
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
Attachment #716200 - Attachment mime type: text/plain → text/html
On Windows, I don't see the blue H jerking because hardware acceleration is enabled. If HWA is disabled, it jerks.
Confirmed the HWA-less Case with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130224 Firefox/22.0 ID:20130224031053 CSet: 195e706140d1 FWIW, reproducible back to Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 Firefox/3.5.19 ID:20110420144310
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Linux → All
Version: 19 Branch → Trunk
Whether this works or not largely depends on what the platform's support for sub-pixel positioning of text is. It's probably worth separating this out into separate bugs for each platform. From what I recall, cairo rounds glyph positions on X11 and thus does not support sub-pixel positioning.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: