Re: [css3-fonts] FontLoader v2

On 9/11/12 2:37 AM, Sebastian Zartner wrote:
> E.g. in Firefox 18 a CSSStyleDeclaration doesn't give direct access to
> properties anymore. CSS2Properties is used for giving direct access
> instead. I.e. in Firefox it is currently not possible to write just
> "style.fontWeight", instead you have to write
> "style.getPropertyValue("font-weight")".

To be clear, this was not possible before Firefox 18 either, for the 
specific case of the .style of a CSSFontFaceRule.  Specifically, Firefox 
16 and earlier will simply throw if you try to do style.fontWeight on 
this particular CSSStyleDeclaration.  Firefox 17 _may_ work, sort of by 
accident.

And yes. I strongly feel that CSSFontFaceRule.style should not be a 
CSSStyleDeclaration....

> How about a compromise? Implement "event.fontface" with "fontface"
> being a CSSFontFaceDescriptors (though I'm not sure if Boris meant it
> to allow directly accessing properties or just via
> getPropertyValue()).

I would have no problem with direct property access on a 
CSSFontFaceDescriptors object.

My problem is with a spec that says that CSSFontFaceRule.style has a 
.color property.  ;)  Or a .display property, for that matter.

Note also that there are descriptors whose names are not CSS property 
names; we would want to expose those on the object as well.

-Boris

Received on Tuesday, 11 September 2012 11:24:13 UTC