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

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

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 22 Aug 2012 01:04:00 -0700 (PDT)
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <1911654061.3028222.1345622640866.JavaMail.root@mozilla.com>
Tab Atkins wrote:

> > I think you need to define some way to determine whether other
> > font loads are still pending, since a given page may require
> > multiple fonts due either to style selection or character
> > handling.  Given the lazy loading nature of downloadable fonts,
> > just defining a simple load event is insufficient.
> >
> > With a "loads pending" attribute somewhere, the typical font handling
> > logic would be:
> >
> > 1. Make changes that might cause a font load
> >
> > 2. Check to see whether font loads are pending
> >
> > 3. If necessary, wait for font loads to complete
> >
> > 4. Do stuff that requires the fonts to be loaded
> 
> I'm not handling this quite yet - for now, people can track whether
> the fonts they care about have loaded or not by themselves.

Which they can't do in all cases because that's determined by style
matching and fallback.  Authors would need to understand in great
detail how many fonts are going to be loaded to render the text on a
given page.

Cheers,

John
Received on Wednesday, 22 August 2012 08:04:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT