Re: [css3-fonts] FontLoader v2

On Mon, Sep 10, 2012 at 5:47 PM, Glenn Adams <glenn@skynav.com> wrote:
> On Tue, Sep 11, 2012 at 8:14 AM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> On Mon, Sep 10, 2012 at 1:11 AM, John Daggett <jdaggett@mozilla.com>
>> wrote:
>> > To give this proposal a home, I've added the latest version to the
>> > editor's draft of CSS3 Fonts.  We can always move it to a separate
>> > spec if necessary.
>> >
>> >   http://dev.w3.org/csswg/css3-fonts/#font-load-events
>>
>> Excellent!  The only problem I have with it is one I brought up in v1
>> - the "load" and "error" events expose the loaded font via a
>> "fontface" attribute.  This means that you have to write, say,
>> "event.fontface.style.weight" to get the weight of the loaded font,
>> when trying to identify which font was loaded.  My original proposal
>> attached all the @font-face descriptors directly to the event object,
>> so you'd just write "event.weight".  We don't seem to gain anything by
>> the additional indirection, so we should remove it and make things
>> easier for authors.
>
>
> Unless we change CSSFontFaceRule to not use CSSStyleDescriptor as a home for
> the descriptor set, I would oppose not using the fontface object above. That
> is, I don't want to see two interfaces, both CSSStyleDeclaration and this
> event object duplicating all the descriptor IDL attributes on different
> interfaces. DRY DRY DRY

Theoretical purity falls below author utility.  We shouldn't punish
authors by forcing them to write ".fontface.style" just because we
spec authors can't get our act together on the IDL side.

~TJ

Received on Tuesday, 11 September 2012 00:51:25 UTC