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

Issue 685293 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

FontFace loaded font can't be used on Canvas

Project Member Reported by fs...@chromium.org, Jan 25 2017

Issue description

When trying to draw a font loaded by FontFace, it is as if the font is not available for canvas to draw.

On the example below, the expectation would be that the text would be rendered in a handwritten font (Amatic SC).
 
fontface.html
599 bytes View Download

Comment 1 by fs...@chromium.org, Jan 25 2017

Owner: japhet@chromium.org

Comment 2 by japhet@chromium.org, Jan 25 2017

Cc: japhet@chromium.org
Owner: toyoshim@chromium.org

Comment 3 by junov@chromium.org, Jan 25 2017

Additional data point: the font renders correctly if you try to use it a second time after a long timeout.

We expect that after loading is complete, the font would be immediately available for rendering, and that any outstanding preparation tasks would be performed synchronously at that time.

What seems to be happening is that there is a and additional async preparation step that still needs to be performed after the the load promise is resolved.  The first attempt to use the font for drawing to a canvas lazily triggers this, and at a later time, the font resource becomes good to go.


 
There is a common pitfall of CSS Font Loading API -- FontFace must be added to document.fonts before using.

fserb@, can you try attached fontface2.html? This works for me.

fontface2.html
627 bytes View Download
Owner: ksakamoto@chromium.org
Since ksakamoto@ already replied, I'd assign this to ksakamoto@.

Comment 6 by fs...@chromium.org, Jan 30 2017

Status: (was: Untriaged)
this seems to work. Thanks.

Comment 7 by fs...@chromium.org, Jan 30 2017

Status: WontFix

Sign in to add a comment