Re: @font-face support detectable in Javascript?

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 Wednesday, 7 January 2009 13:31:21 UTC