[css-font-loading] IE Review of font loading

Hey Tab,

The IE team got together to review your current spec and raised the following questions and suggestions, please let me know if you have any questions.


*         The spec assumes that Promises are already implemented. However, at this point, this would be the first spec to require promises and it still doesn't link the suggested Promises implementation and spec. At the very minimum the spec should link the current draft for Promises specification.


*         Current definitions for FontFace interface attributes suggest that FontFace object properties would be editable; in most cases that would invalidate current styles and require additional layout passes on every property change and might be expensive.  Is this really intended or should those attributes be read-only and instantiated in the constructor?


*         If script in the ready handler changes DOM or styles this might require additional layout calculations (however, this is no different from existing script callbacks handlers). We think that the spec should tell developers that this will not address font loading performance issues, it mainly addresses async loading. A good spot for this might be in the abstract of the spec.


*         In the current FontFace interface definition 'source' is set in constructor. Should this be reconsidered to semantically align this object with XHR more?


*         Something that might require clarification in the spec: If source is set to multiple Urls, then we would suggest to fire success at first successfully loaded url and fire error when we've tried all available options (and don't fire on each individual attempt). The term font load indicates when the loading of content for a given FontFace object completes.


*         Paragraphs "A FontFace object may list multiple alternate resources within its [Urls] attribute, including references to local fonts, but the term font load only refers to the loading of the finally selected resource for a given FontFace, not to the loading of each individual resource" should move to the FontFace interface description (http://dev.w3.org/csswg/css-font-loading/#dom-fontfaceset).


*         It is unclear why FontFaceSet is needed for Workers. In our understanding of the spec this addresses the core problem that developers would try to solve with Workers in the first place.


*         FontFaceSet might contain more fonts than LoadingFonts + LoadedFonts + FailedFonts + PendingReadyPromises (see notes for Example 4 below).


*         Examples feedback:

o   Example 2 (typo?): possibly means document.FontFaceSet, not document.fonts.

o   Example 3: This example is illustrates a pattern that would lead to terrible performance. Maybe there is another alternative to demonstrate this concept?

o   Example 4: If there are 3 @font-face rules, but in CSS only 2 are used - it's suggested that implementation would fire loaded when all 3 are loaded, while currently only 2 actually used fonts would get loaded.

Thanks,
Greg

Received on Tuesday, 4 March 2014 20:27:15 UTC