Re: [css-fonts] ready attribute vs function

On Tue, Oct 6, 2015 at 2:54 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> 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?


yes, maybe you can drop "which might cause the user agent to request a font
".

Received on Tuesday, 6 October 2015 22:04:25 UTC