Re: [css3-fonts] FontLoader v2

On Mon, Sep 10, 2012 at 1:11 AM, John Daggett <jdaggett@mozilla.com> wrote:
> To give this proposal a home, I've added the latest version to the
> editor's draft of CSS3 Fonts.  We can always move it to a separate
> spec if necessary.
>
>   http://dev.w3.org/csswg/css3-fonts/#font-load-events

Excellent!  The only problem I have with it is one I brought up in v1
- the "load" and "error" events expose the loaded font via a
"fontface" attribute.  This means that you have to write, say,
"event.fontface.style.weight" to get the weight of the loaded font,
when trying to identify which font was loaded.  My original proposal
attached all the @font-face descriptors directly to the event object,
so you'd just write "event.weight".  We don't seem to gain anything by
the additional indirection, so we should remove it and make things
easier for authors.

~TJ

Received on Tuesday, 11 September 2012 00:15:00 UTC