[OpenFontLibrary] font face firefox friendly?

Ed Trager ed.trager at gmail.com
Wed Jan 7 04:31:51 PST 2009


Hi, everyone,

It would be nice if there were a way to query the browser (using
Javascript) about whether web fonts are supported or not.  If that
were possible, then a web site like the new OFLB site could
dynamically show the web font preview when supported, and hide it from
view when not supported.

The Javascript would be trivial to write but my investigation so far
has not revealed any way of detecting web font support.

It is a common "best practice" principle when coding in Javascript
nowadays to check for the existence of certain properties.  If the
property exists, then we can exploit the functionality whose presence
is implied by the presence of that property.  If not, we can code
around it.

So perhaps we need to encourage the browser developers to expose a
public property, or document such if it already exists:

           if( thisBrowser.supportsWebFonts ){
                         myWebFontDiv.style.display="block";
           }else{
                         myWebFontDiv.style.display="none";
           }

While I agree that the new OFLB site needs to rally toward the future,
unfortunately it looks clunky to say "The text to the right should be
rendered in Font_xxxx thanks to web font linking with @font-face. If
you see a monospace font, your web browser probably does not yet
support this new web technology."

On my laptop, I see DejaVu Mono Sans used in FF 3.0.5 for the
unsupported @font-face preview.  The problem is, unless I look very
closely, I might actually think that I *have* got a preview of
"Font_xxx" --especially if "Font_xxx" is some kind of sans serif font
(like Puritan, for example)!

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.

- Ed Trager


On Tue, Jan 6, 2009 at 4:00 PM, Dave Crossland <dave at lab6.com> wrote:
>
> 2009/1/6  <Fontfreedom at aol.com>:
> >
> >>Dave Crossland wrote:
> >>FF3.1
> >
> > So...you are focusing quite a bit of the new site on a feature not present
> > in MSIE, and only present in a beta version of Firefox. Hopefully
> > more browsers will support this in the future....
>
> MSIE has web fonts for its DRM format, which the W3C has rejected, so
> no one else will ever support it. So we have to just wait for IE to
> support non-DRM formats.
>
> Opera's latest beta has support. Safari ships with support for nearly
> a year. Chrome is rumoured to have support.
>
> Web fonts is coming.


More information about the OpenFontLibrary mailing list