W3C home > Mailing lists > Public > www-style@w3.org > February 2014

[css-font-loading] FontFace objects and the FontFaceSet interface

From: John Daggett <jdaggett@mozilla.com>
Date: Fri, 28 Feb 2014 00:00:43 -0800 (PST)
To: www-style list <www-style@w3.org>
Message-ID: <1143325878.21214078.1393574443882.JavaMail.zimbra@mozilla.com>

Comments related to the Font Loading spec from Jonas Sicking:

One thing I don't know enough about to verify though is if the logic
about when FontFace objects are added to the map makes sense. Has
someone else checked that.

Something that strikes me as a bit strange is that FontFace objects
seems to have an important identity. Since the FontFaceSet interface
keys on the identity of FontFace objects, it means that you can't do
lookups based on urls or names. I.e. you can't query the FontFaceSet
interface to check "is the font at url http://example.com/font.woff
loaded" or "is a font with name 'foopy' loaded".

Though of course you could always enumerate the full set and see if
any objects match what you're looking for.

But if that's the only use case, then the set is just an Array and not
a Set.

Also, what happens if a FontFace is added to the set using .set()
rather than through .load()? And what happens if a FontFace is removed
through .delete()? And what happens if something other than a FontFace
is added through .set()?

Cheers,

John Daggett
Received on Friday, 28 February 2014 08:01:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC