Re: [css-fonts] ready attribute vs function

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

> On Tue, Oct 6, 2015 at 2:00 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> > On Tue, Oct 6, 2015 at 1:20 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
> >> FontFace.ready() should fulfill as soon as the font is loaded.
> >> FontFaceSet.ready() is required to wait until layout operations are
> >> done; if it's not doing so, it's a bug and shoudl be reported.
> >> (That's the *entire point* of FontFaceSet.ready() - letting you know
> >> when the font-related stuff is "settled" and you can start measuring
> >> things.)
> >
> > I agree. The font loading spec does not call out that distinction though:
> >
> >> The ready attribute contains a Promise which is resolved when the
> document
> >> is done loading fonts
> >
> > Before I file a bug, it would be good if that is clarified in the spec.
>
> Yes it does, in the part of the spec *that actually defines when to
> resolve the promise*.  You're quoting the non-normative fluff text
> describing the attribute.  Look just a little bit further down for the
> actual algorithms controlling this.
>
> (There's no way that sentence could possibly actually govern the
> behavior of the promise; it's completely underspecified! I'd have to
> be a terrible spec author to try and pass that off as normative text.)
>

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.

Received on Tuesday, 6 October 2015 21:42:47 UTC