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

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


John Daggett

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