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

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 27 May 2014 11:44:44 -0700
Message-ID: <CA+c2ei_VS3zZq2cb+iEAWsQKM8tzHCyg3FjAwnUivXvB3uxgSg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
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 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?

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.

/ Jonas
Received on Tuesday, 27 May 2014 18:45:41 UTC

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