W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: Last Call for "CSS Font Loading Module Level 3"

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 27 May 2014 12:14:45 -0700
Message-ID: <CAAWBYDDJiB0vWDE89YuJUQyxY3qa0tLd3TowYPyZ+nXmQKhOeg@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, Domenic Denicola <domenic@domenicdenicola.com>, "chairs@w3.org" <chairs@w3.org>, public-webapps <public-webapps@w3.org>, "public-webfonts-wg@w3.org" <public-webfonts-wg@w3.org>
On Tue, May 27, 2014 at 11:44 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> On Tue, May 27, 2014 at 10:41 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> Separately, FontFace.loaded seems to fulfill the same purpose as
>>> FontFaceSet.ready(). I.e. both indicate that the object is done
>>> loading/parsing/applying its data. It seems more consistent if they
>>> had the same name, and if both were either an attribute or both were a
>>> function.
>>
>> No, the two do completely different (but related) things.  Why do you
>> think they're identical?  One fulfills when a *particular* FontFace
>> object finishes loading, the other repeatedly fulfills whenever the
>> set of loading fonts goes from non-zero to zero.
>
> Semantically they both indicate "the async processing that this object
> was doing is done". Yes, in one instance it just signals that a given
> FontFace instance is ready to be used, in the other that the full
> FontFaceSet is ready. Putting the properties on different objects is
> enough to indicate that, the difference in name doesn't seem
> important?

The loaded/ready distinction exists elsewhere, too.  Using .loaded for
FontFaceSet is incorrect, since in many cases not all of the fonts in
the set will be loaded.

> In general it would be nice if we started establishing a pattern of a
> .ready() method (or property) on various objects to indicate that they
> are ready to be used. Rather than authors knowing that they need to
> listen to "load" events on images, "success" events on
> IDBOpenRequests, .loaded promise on FontFace objects and .ready()
> promise on FontFaceSets.

Yes, I'm actively working with Anne, Domenic, and others to help
figure out the right patterns for this that we can extend to the rest
of the platform.

~TJ
Received on Tuesday, 27 May 2014 19:15:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC