[Font Loading] FontFaceSet's Ready Promise

Hello,
I'm implementing the CSS Font Loading spec in WebKit. During implementation, I have come across this issues in the spec:

FontFaceSet exposes a "ready" promise attribute, which can therefore only be resolved once. However, fonts may start and end loading at any time. Therefore, this promise will give unintuitive and incorrect information much of the time. Instead, the mechanism used to notify script when all fonts in the set have finished loading should be achieved via sending events.

Therefore, script would first check the "status" attribute to know if there are currently any active downloads. If there are, it would register an event listener. This event would be fired whenever the number of loading fonts goes from 1 -> 0.

--Myles

Received on Thursday, 4 February 2016 08:49:24 UTC