RE: [css-font-loading] New interface for FontFace or modifying the current one?

I figured there was a reason you guys set it up the way you did. I was hoping to avoid the redundancy of code but I understand the reasoning behind it, thanks for the clarification.

Greg

-----Original Message-----
From: John Daggett [mailto:jdaggett@mozilla.com] 
Sent: Thursday, March 6, 2014 9:32 PM
To: www-style@w3.org
Subject: Re: [css-font-loading] New interface for FontFace or modifying the current one?


Greg Whitworth wrote:

> I apologize if this is a silly question but I am just wanting some 
> clarity on the FontFace interface. Is this a new FontFace interface or 
> merely representing that we are updating the current one with 
> FontFaceLoadStatus and a Promise?

I think what you're asking may be whether the FontFace interface reflects a revision of the CSS OM interface for @font-face rules [1]. 
It's not, it's an entirely new interface.  The CSSFontFaceRule interface inherits from CSSRule and is tied to the DOM.  The FontFace/FontFaceSet interfaces are made to allow fonts to be loaded within worker threads which don't have DOM access.  Hence the need for a new interface and the somewhat awkward coexistence of both FontFace and CSSFontFaceRule.

Cheers,

John Daggett

[1] http://dev.w3.org/csswg/css-fonts/#om-fontface

Received on Friday, 7 March 2014 05:41:40 UTC