Buh-bye Arial, So Long Verdana, Hello @font-face

July 16, 2009 10 Comments

font-face

The @font-face rule allows authors to specify online fonts to display text on their pages. In other words, you’ll be able to use fonts outside the usual Arial, Verdana, Georgia and the like, even if the end user doesn’t have them resident.

There are a few other things worth mentioning. The rules are unique to CSS3, so only a few of the newest browsers support them. The fonts you use must be made public, so if you use the rule you’re essentially distributing the fonts – not cool. That’s its biggest hurdle right now and may in fact lead to its demise unless someone can figure out how to protect the fonts. I’m not convinced services like Typekit are the answer.

Originally, we had designed a page using some recently purchased H+FJ fonts but quickly realized we couldn’t use the layout without distributing the fonts. Don’t hate the playa, hate the game.

Before you go clicking you’ll need a really modern browser. Firefox works best, not only in the way it renders the actual type but also the way it displays letter spacing. The new Safari and the Opera beta browsers will also render it decently. We could have made the page degrade gracefully for older browsers, but we didn’t. While you can still view the page in older browsers it’s gonna look like it’s 1999.

Update: It seems as though Firefox 3.5 for Vista doesn’t render a few of the fonts well or at all.

view the sample page

Okay, so we won’t be using it anytime soon due to the issues stated above, but it sure does look promising. There’s a good post at craigmod on this subject too if you want to learn a bit more.

Geoff Teehan

written by Geoff Teehan

Comments 10

  • Felix

    wow – this changes everything! Hopefully there will be a bunch of open source fonts released to fix the distribution issue.

  • Nick

    Thanks for the sample – I ran into the FF3.5 Vista problem too…. I wonder if it’s the same for FF3.5 on Win7.

    When I first read about the tag, I thought people were trying ot make some sort of open font standard…or at least get it more widely used?

  • Les Reynolds

    @font-face has the potential to change the way the web looks, assuming that the licensing issues get sorted out. From what I’m reading, there seem to be lots of very smart people working very hard to arrive at a solution.

    In the mean time, there are free fonts that allow embedding, and adding Cufon into the mix allows users running IE to have nice fonts as well. That is what I’ve done on my new site.

    I detailed the process on my blog (which isn’t ready yet, but I’ll make an exception since it is relevant) Beautiful Typography with @font-face & Cufon.

    The future is exciting!

  • Mike Healy

    Do you find the file size of font files a concern for lean web design when it comes to production sties?
    Your sample page had 174kB of font files. Obviously you used more fonts than you might choose for a production site.

    I wonder if browsers would accept compressed (gzip) font files if sent with the appropriate header?

  • Andre Chappelle

    Looks beautiful in Safari. Chunkfive is not displaying in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2. Everything else seems to be in place. Just thought I’d let you know.

  • Brendan

    Cufon has the same licensing issues as above, try open source fonts like front OpenOffice.org ..those should be freely distributable.

Leave a comment