Re: [css3-fonts][cssom] Load events for webfonts?

> > It looks to me (though I read it somewhat quickly) like consensus
> > there was tending towards:
> >  * events when fonts load
> >  * an API to ask whether all the fonts for an element/document have
> >    been loaded
> 
> The tricky part of this is that @font-face fonts load on demand and
> which font in a family is loaded is determined by the style matching
> rules.  So if the author defines four @font-face rules for regular,
> bold, italic and bold italic but only the italic face is needed,
> that's the only one that will be loaded (modulo EOT font load behavior
> in pre-IE9 versions of IE which is not lazy).
> 
> I think the two API's above may be the simplest to implement.  I think
> the "all fonts loaded?" API should be associated with the document,
> since fonts are attached to the document not to specific elements.

Just to give another example where such events / API would be needed:

Firebug wants to highlight the used font(s) inside an element. For web fonts it fails because it displays the styles before the fonts are loaded:

http://code.google.com/p/fbug/issues/detail?id=2495

Sebastian
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Received on Friday, 25 May 2012 03:54:34 UTC