Re: [css-font-loading] FontFaceSet constructor

On Sun, Jun 29, 2014 at 7:52 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> What's the use case for being able to construct a FontFaceSet that is not
> associated with the document?

I know of at least two.

One, if it's intended to be immediately sent to a worker, and not used
on the page.  (Avoiding associating it with the document prevents the
style engine from having to check if the new font is higher in the
font-family list for anything on the page.)

Two, it lets people set up separate sets of low-priority fonts to load
in the background, only adding to the main document when they're fully
loaded.  Associating them with the document immediately means they'll
interact in possibly confusing or annoying ways with the events and
ready promise.  (This one was explicitly brought up to me by an author
on Twitter.)

~TJ

Received on Monday, 30 June 2014 21:58:01 UTC