Re: @font-face support detectable in Javascript?

+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 UTC