- From: John Daggett <jdaggett@mozilla.com>
- Date: Wed, 19 Mar 2014 23:15:17 -0700 (PDT)
- To: www-style list <www-style@w3.org>
>From a previous post: > >> Hmmm, I think we should go the other way. Have load() return a promise > >> and leave ready() as it was. The ready() method is the only way to > >> passively observe individual font loads using Promises (e.g. a user > >> altering a textfield may induce the loading of a fallback font). > > > > Is there a reason to passively observe an individual font using > > promises? I can't think of any good ones, and the lack can be hacked > > around by using the events. > > Well, I don't think we should try and predict exactly when authors > would use promises vs. when they would use events. I can imagine > scenarios where they would use a mixture of font preloading and lazy > loading, especially if situations with user-driven content. If the > promises are used to respond to font availability then I don't think > it makes sense to distinguish active loads vs. passive loads. So I > think the ready() method makes sense and it makes the FontFace > interface match FontFaceSet interface which is a good thing. Just to emphasize, I don't think removing ready() from FontFace is the right thing to do here, it forces authors who want to passively listen for individual font loads (rather than explicitly loading them) to use an event listener. I think they shouldn't be required to use events. Cheers, John Daggett
Received on Thursday, 20 March 2014 06:15:47 UTC