W3C home > Mailing lists > Public > www-style@w3.org > May 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 24 May 2012 23:24:18 -0700
Message-ID: <CAAWBYDBs8J+79Pm7eXGqsmmXUYhn1A2=4bNUtuW8fgsoWtLZZQ@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style@w3.org
On Thu, May 24, 2012 at 11:14 PM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> Le 25/05/12 02:26, Tab Atkins Jr. a écrit :
>> Preferably, it would be fired at the @font-face rule in the CSSOM, so
>> you don't have to go to any particular effort to figure out which font
>> it was.  If you do something more general like firing it at document,
>> you have to provide all the descriptors so you can distinguish
>> separate rules.
>> Thoughts?
> Yes, load events on fonts are IMHO absolutely needed. Not only for the
> reasons you gave but also because some web sites want to know
> precisely if the rendering the user gets is the one they designed. An
> error event of a font is important information.
> What about the event target? How will you add the event
> listener? Doing it on the document is simple. On a font at-rule, that's
> considerably harder for web authors because of CSSOM complexity...

Boris provided a good reason why firing it at the @font-face rule is
unusable in common situations - you won't be able to attach a listener
to cross-domain resources.

I suppose that means that firing it at the document is necessary, but
the difficult then is figuring out which @font-face it was for.  I
guess the event object would just have to have a property that's a
dict of all the descriptors on the rule.

Received on Friday, 25 May 2012 06:25:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC