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

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 UTC