W3C home > Mailing lists > Public > www-style@w3.org > October 2015

Re: [css-fonts] ready attribute vs function

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 6 Oct 2015 14:54:26 -0700
Message-ID: <CAAWBYDAWDggv0vYdsHcdwOSSxb_xXC7nOPu2Ps9ny2zXNZnTxg@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: John Daggett <jdaggett@mozilla.com>, www-style list <www-style@w3.org>
On Tue, Oct 6, 2015 at 2:50 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> On Tue, Oct 6, 2015 at 2:44 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> On Tue, Oct 6, 2015 at 2:42 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> > Can you point out where in the spec that is defined? I can't find any
>> > text
>> > that says that the ready() promise is fulfilled when all fonts are
>> > loaded
>> > and applied to the layout.
>>
>> It's in the algorithms in
>> <https://drafts.csswg.org/css-font-loading/#FontFaceSet-events>.
>> Those algorithms are the only things in the entire spec that touch the
>> [[ReadyPromise]] slot.  Note also the definition of "pending on the
>> environment", and where it's invoked in the algorithms.
>
> Yes, I saw that:
>
> A FontFaceSet is pending on the environment if any of the following are
> true:
>
> the document is still loading
> the document has pending stylesheet requests
> the document has pending layout operations which might cause the user agent
> to request a font.
>
>  None of those are true if a document still needs layout after all the fonts
> are downloaded.

The last one is meant to capture what you're looking for.  Maybe I can
make that clearer?

~TJ
Received on Tuesday, 6 October 2015 21:55:13 UTC

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