Re: Shouldn't fonts embedded through @font-face be available in <canvas>?

"L. David Baron" <[email protected]>
Newsgroups gmane.comp.web.fonts,gmane.comp.web.css.general
Message-ID <[email protected]>
On Monday 2010-09-27 08:11 +1300, Robert O'Callahan wrote:
> This problem has been discussed before on the WHATWG list. It's tricky
> because in some browsers (e.g. Gecko) we only start loading the font after
> you try to draw text that needs it. One possible solution: after drawing
> canvas text with a font that hasn't finished loading, when the font finishes
> loading fire an event at the canvas, e.g. "fontload".

Another possible solution (which might be useful for other things,
but also might be more painful to use than a solution specific to
this problem) is to add APIs to CSSFontFaceRule to:
 * find out if the font is loaded
 * request that the font be loaded (and add an observer to be called
   when it is)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.