FontFace loaded font can't be used on Canvas |
|||||
Issue descriptionWhen 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).
,
Jan 25 2017
,
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.
,
Jan 26 2017
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.
,
Jan 26 2017
Since ksakamoto@ already replied, I'd assign this to ksakamoto@.
,
Jan 30 2017
this seems to work. Thanks.
,
Jan 30 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by fs...@chromium.org
, Jan 25 2017