[OpenFontLibrary] @font-face, is it really needed for font preview?

Ed Trager ed.trager at gmail.com
Mon Feb 9 07:56:56 PST 2009


Hi, Khaled,

You are correct that the "Font Playground" previewer I wrote provides
dynamic previews using server-generated PNG images and AJAX for
communication.  It currently works using a div-based popup-window
which I thought would be a good way to avoid gobbling up too much
"screen real estate" -- especially when you consider the fact that a
single font may have a number of style variants.

I also wrote an additional bit of Javascript which attempts to
dynamically detect whether the browser provides @font-face support or
not.  As far as I know, that javascript has not yet been incorporated
into the new site. This bit of javascript in theory will allow a site
like OFLB to dynamically alter the display of a page based on whether
@font-face support is present or not.  Here is the demo page -- feel
free to look at the javascript under the hood and improve it if
possible:

              http://eyegene.ophthy.med.umich.edu/fontface/

Also although that bit of Javascript code is as reliable as I could
get it to be, at this point in time the browsers are *not* yet
reliable with regard to @font-face support.

So the Javascript may report a browser as having support because the
foundational stuff is already incorporated into the browser code, but
the support may not yet work (Google Chrome, based on WebKit, is a
good example of this).

There are also versions of Opera and Firefox out there that purport to
support @font-face but don't really, or do so only partially.  For
example, some support TTF but fail on OTF fonts on one platform or
another.  I think I have my
http://eyegene.ophthy.med.umich.edu/fontface/ URL currently set only
for testing a couple of TTF files -- I had previously used OTF files
which often didn't work and left me quite confused.

-- Ed

> On Mon, Feb 9, 2009 at 10:29 AM, Khaled Hosny <khaledhosny at eglug.org> wrote:
>
> The new OFLB website uses @font-face CSS property for font preview, but
> I wonder if we really need it? Most browsers don't support it, even with
> the release of Firefox 3.1 we still have around 70% of web users with
> browsers that don't support it. Even if we put this aside, why I need to
> download a several megabits font just to get a static preview of it, it
> isn't even dynamic, what is the benefit (some Arabic or CJK fonts are
> even larger). Don't get me wrong, I find @font-face very great feature,
> but I think we are misusing it here.
>
> I think generating server side previews gives more better and responsive
> user experience, I think "font playground" already does this, just we
> need to merge it into the "main body" of the page instead of the current
> hidden (and annoying) separate popup (or whatever it is called).
>
> Regards,
>  Khaled
>
> --
>  Khaled Hosny
>  Arabic localizer and member of Arabeyes.org team
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkmQS+UACgkQRoqITGOuyPIgZgCeKnapT7eoGmY3SKhRdUgtROwq
> ys4An1fl1UzKxbJi74bpi/DaKq58n50M
> =blSJ
> -----END PGP SIGNATURE-----
>
>


More information about the OpenFontLibrary mailing list