Re: [cssom] exposing loading of font (and other) resources

On 9/2/11 2:50 PM, L. David Baron wrote:
> On Friday 2011-09-02 14:18 -0700, Edward O'Connor wrote:
>    
>> It would be nice if there were a reliable way for Web authors to be
>> notified when their @font-face resources have successfully loaded.
>> Currently authors resort to several hacks to acheive this.
>>
>> One option would be to have objects in the CSSOM that correspond to each
>> embedded resource referenced from within the loaded stylesheets. Authors
>> could then attach event handlers to such objects, query their current
>> state, etc.
>>
>> Another, perhaps more author-friendly option would be for some new event
>> to be fired at the Document whenever a resource linked to in CSS gets
>> loaded. The event would carry information about which resource(s) it
>> refers to.
>>      
> There's a good bit of discussion of this in
> https://bugzilla.mozilla.org/show_bug.cgi?id=471915 .  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
>
> I'm not sure how well that satisfies the<canvas>  use cases, though.
>    

Michael Deal posted some studies on Canvas and font loading:
http://mudcu.be/journal/2010/11/unicode-profiling-project/

Received on Friday, 2 September 2011 23:37:33 UTC