W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: @font-face support detectable in Javascript?

From: Alex Russell <slightlyoff@google.com>
Date: Mon, 12 Jan 2009 13:30:45 -0800
Message-ID: <6fc58d0d0901121330l476c45faw2fad3fa2ae20a254@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Dave Crossland <dave@lab6.com>, "www-style@w3.org" <www-style@w3.org>, Ed Trager <ed.trager@gmail.com>

+1 to a browser detection flag (or, best case, a less clunky OM for
detecting this kinda thing).

Regards

On Wed, Jan 7, 2009 at 5:30 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>
> Dave Crossland wrote:
>>
>> 2009/1/7 Ed Trager <ed.trager@gmail.com>:
>>>
>>> If someone on this list has any ideas on how to check for @font-face
>>> support using Javascript, please let all of us know about it.
>
> You could try using the CSSOM to see how the browser parsed the @font-face
> rule.  It's clunky, and you'd need to check for various conditions (e.g.
> UNKNOWN_RULE in some UAs vs the rule being absent from the CSSOM altogether
> in others), and some UAs may not support the relevant parts of the CSSOM.
>  But it would have the advantage of working today with no further browser
> changes.
>
> It might not be a bad idea to introduce a feature string or something for
> this, though....
>
> -Boris
>
>
Received on Tuesday, 13 January 2009 10:23:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT