New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 634161 link

Starred by 0 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Canvas fontKerning style ignored on un-parented canvas

Reported by sam.thom...@gmail.com, Aug 3 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
1. http://jsfiddle.net/uoxd41m4/3/
2. Note that the kerning is on for the top row of text, despite it being turned off.

What is the expected behavior?
Neither row of text should have kerning.

What went wrong?
Setting "font-kerning: none" did not apply on the canvas that was not already in the document body, so when it was blitted over it looks different than the one rendered directly on the main canvas.

Did this work before? N/A 

Chrome version: 51.0.2704.103  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
 
Cc: durga.behera@chromium.org
Components: Blink>Canvas
Labels: Needs-Feedback
sam.thompson232@ : Could you please review the screen shot and let us know what is the expected result of it to help further triage it.
Attached scrren shot of Mac 10.11.6 on latest stable 52.0.2743.116.
Screen Shot 2016-08-04 at 3.36.00 PM.png
152 KB View Download

Comment 2 by junov@chromium.org, Aug 4 2016

Status: WontFix (was: Unconfirmed)
The behavior you are observing is spec compliant, if I am not mistaken. For style to get computed for a given element, the element has to be part of a style cascade.  

I think what you would want for this case is a fontKerning attribute to CanvasRenderingContext2D.  You could request that feature by filing an issue here: https://github.com/whatwg/html/issues

In the meantime, you can hack it.  To draw text into a canvas that is not displayed but still parented to the document, you can place the canvas at a negative y position, far beyond the top of the document.

Sign in to add a comment