How to Use Any Font on the Web

{ Posted on Feb 05 2010 by Louis Gubitosi }

As a designer, typography is a very important aspect to my work. Now as far as print design, implementing any form of type isn’t a problem, but when it comes to the web then there’s only a certain amount of fonts you can use, right? WRONG.

In the last couple of years, there has been some growth in using other typefaces on the web.  CSS allows developers to use a property called @font-face to define a new typeface and these fonts are 100% SEO friendly.  Some fonts can be purchased for embedding, however those license fees are usually out of reach for small companies or individuals - Greg Tarnoff.  The issues surrounding @font-face are that downloading and sharing fonts via this attribute is breaking copyright laws.

With that in mind, the four methods that I am going to discuss are SIFR, FLIR, Cufon and Typeface.js.

 

siFR (Scalable Inman Flash Replacement) – JavaScript AND Flash

http://www.mikeindustries.com/blog/sifr

sIFR is meant to replace short passages of plain browser text with text rendered in your typeface of choice, regardless of whether or not your users have that font installed on their systems. It accomplishes this by using a combination of JavaScript, CSS, and Flash.

    Pros:

  • Accessible, selectable and most important cross browser compatible.
  • Does not violate EULA or copyrights, since font is contained within the SWF object.
  • You can easily add shadows and other text effects in Flash
    Cons:

  • Slower page loading – has to request for Flash, JavaScript and CSS files
  • Requires both JavaScript and Flash to be enabled
  • Flash plugin must be installed in the browser
  • Cannot display on an iPhone. Yet…

siFR elsewhere:

Convertor:

 

FLIR (Facelift Image Replacement) – JavaScript and PHP

http://facelift.mawhorter.net

An image replacement script that dynamically generates image representations of text on your web page in fonts that otherwise might not be visible to your visitors. The generated image will be automatically inserted into your web page via JavaScript and PHP and visible to all modern browsers.

    Pros:

  • Does not violate EULA or copyrights, since font is rendered as an image
  • Prints in the font rendered since it is an image
    Cons:

  • Requires PHP with the GD enabled
  • Text cannot be selected

FLIR elsewhere:

Download:

 

Cufon – JavaScript

Cufon is basically a new and improved version of Typeface.js, with a focus on faster and easier implementation and no Flash or images required.

    Pros:

  • Do not need to load the Flash plugin which makes it fast, even for sufficiently large amounts of text
  • work on every major browser
  • close to zero configuration needed
    Cons:

  • Not many fonts are permitted to be rendered with this method
  • the JavaScript files used for the font can be easily reverse engineered and “stolen” which violates EULA and copyright laws
  • Inability to highlight and copy/paste text

Cufon elsewhere:

Convertor:

 

Typeface.js – JavaScript

http://typeface.neocracy.org

Instead of creating images or using flash just to show your site’s graphic text in the font you want, you can use typeface.js and write in plain HTML and CSS, just as if your visitors had the font installed locally.

    Pros:

  • User doesn’t have to have Flash plugin installed on their browser
  • Easier to create with just a few lines of JavaScript
    Cons:

  • Recommended to use only for headlines because too much text will slow down page load
  • Cannot be read by screen readers
  • Not all browser compliant and still has a lot of development left to be done

Typeface elsewhere:

Convertor:

 

Conclusion

Which method is better? All of them perform wonderfully for large header text but all are very different from one another. It is up to you as the developer to determine what is important to you… does it load fast, is it selectable, does it work in every browser?

Who would you rather use?

Posted on February 5, 2010 at 2:06 pm

Tweets about this post elsewhere...

Enjoy the article? Share it!

 

Stay Current

We will continue to find more and more interesting topics over time, so make sure to keep yourself up to date using our
RSS Feed
or Email Subscription.

 

Read more! Here are some similar posts:

 

There are 38 comments (+add)

  1. Chris says:

    Actually with Cufon, you can have a hover state. You just need to declare your doc type as XHTML Strict. Good article!!

    ReplyReply
  2. uberVU - social comments says:

    Social comments and analytics for this post…

    This post was mentioned on Twitter by iBlend: How to Use Any Font on the Web http://bt.io/ERk3...

  3. Kawsar Ali says:

    very useful post. Great job Louis. SIFR is my fav.

    ReplyReply
  4. Preston says:

    You should also include typekit. I just used it on my site and it workds beautifully. I linked to it in my name if you wanna check it out. Cheers.

    ReplyReply
  5. Marco says:

    Great comparison with the mostly used techniques, together with examples and “pro’s and con’s”. Used sIFR on my website too, but removed it later on :) .

    Loved the read, great!

    ReplyReply
  6. Derek Land says:

    We used Cufón for our site, OriginDH.com and it works great. Contrary to what you mention above, though, when we were proofing it before launch we noticed one browser (I forget off hand) does allow hover states.

    I haven’t tried the others.

    Great round up.

    ReplyReply
  7. dSine_Lab says:

    You mentioned that siFR doesn’t display on an iPhone yet. What about FLIR and Cufon?

    ReplyReply
  8. Greg Tarnoff says:

    You may be a little misled when it comes to @font-face rules.

    1) No @font-face rules require JavaScript. @font-face is a CSS rule that has been around for years and was added in because IE supported it, which

    2) IE5.5+ support @font-face BUT you have to use a special type of font called EOT. TTF & OTF won’t work. (better yet use FIrefox).

    3) Copyright…you aren’t completely wrong here. The key is to find fonts that allow for distribution across the web. there are plenty of free fonts you can use, and some foundry fonts can be purchased for embedding. However those license fees are usually out of reach for small companies or individuals.

    Check out http://www.fontsquirrel.com for some free @font-face kits that include OTF (if applicable), TTF, EOT, WOTF (a new web standard) and all the CSS you need to make typography work on your site.

    The biggest thing to warn against: don’t use too many fonts as it will increase the weight of your pages.

    ReplyReply
  9. Paradise Planet says:

    Quite cool effect… will definitely use it…

    ReplyReply
  10. Louis Gubitosi says:

    @Greg Thanks… I’ve updated the post on the issues I was incorrect about. Thanks for the heads up.

    ReplyReply
  11. David Vosburg says:

    I’ve used a mix of methods, but these days I have a TypeKit (http://typekit.com) account that I’m a fan of (it uses JS). Definitely affects page load times, but worth it.

    This is an area that the web will continue to grow into. In the meantime, we’ll keep being creative so we can be… creative.

    ReplyReply
  12. Ester Liquori says:

    Have a look at font2style.com!
    It will use only @font-face CSS rule.

    My blog already uses its method to style the text and it will be soon available :)

    ReplyReply
  13. Steve Morin says:

    I have used both Cufon and sifr and think they are great tools, the only thing that makes me balk at using them is how they effect page speed and load time. But if you don’t have to much going on in your design and you want to give your page some pop, using a unique font certainly does that.

    ReplyReply
  14. mike says:

    Very Nice. :) I was looking for something to bring me up to speed on using custom fonts on the web.

    ReplyReply
  15. Guillaume Justier says:

    As some have mentioned before me, no js or flash is still the best way. Use the @font-face CSS3 rule. And check out http://www.font-face.com, the home of @font-face, which are launching soon (full disclosure: I am involved in the site). Fonts for your site, we take care of everything. Beta invite out soon, don’t forget to register if you are interested.

    ReplyReply
  16. David Becerra says:

    What about TypeKit?

    ReplyReply
  17. Jon says:

    Cufon DOES allow one to copy/paste text it has replaced. I just used it on a piece, mirrored here: http://clients.ohtwentyone.com/kidsmoneyschool/comingSoon/index.html

    I tested it. It works.

    ReplyReply
  18. kirkoconnor says:

    There is no way I would sacrifice the SEO value from my headings for any font replacement system.

    Cufon and Typeface.js look best from an SEO perspective.

    ReplyReply
  19. kirkoconnor says:

    obviously Google is heading down a track where page load speed is also going to have some effect on SEO value as well so anything that screws significantly with page load time is going to have not only a negative effect on user experience but also on your ranking.

    ReplyReply
  20. Louis Gubitosi says:

    @Jon, I just went to your link and couldn’t copy any of the Cufon text. What browser are you using? Can someone else give it a try? Thanks.

    ReplyReply
  21. Lam Nguyen - AEXT.NET Mag says:

    Louis, this is the most complete post about the ways we can use any font in our design. Well done!

    ReplyReply
  22. Ryan T Malone says:

    This is great, and definitely something that I do want to learn more about. The only concern that I do have is whether or not using Javascript will impact SEO. For example, using text in headings and in H1 tags, being in Javascript, this would all but render those keywords in headings nothing but mere gap fillers.

    ReplyReply
  23. Golf Royalty says:

    Superb technique. Definatly going to give this a try with the Golf Royalty redesign at Easter. Thanks!

    ReplyReply
  24. You are now listed on FAQPAL says:

    How to Use Any Font on the Web…

    Four methods that I am going to discuss are SIFR, FLIR, Cufon and Typeface.js….

  25. Como usar cualquier fuente tipográfica en un sitio web | Alojate.com Tu Proveedor de Web Hosting, Dominios, VPS, Servidores Dedicados, Factura Electrónica y Marketing para Buscadores en México says:

    [...] How to use any font on the web Share and Enjoy: [...]

  26. Notable Tech Posts – 2010.02.07 | The Life of Lew Ayotte says:

    [...] How to use any font on the web [...]

  27. Chris says:

    I was a sifr fan for 2.5 years, but recently made the jump to Cufon, because sometimes Chrome has issues with sifr. Also, Cufon is much easier to style than sifr.

    Typekit also looks promising, but the biggest drawback for me is depending on the browser’s anti-aliasing which is good on OS X, but terrible in Windows.

    ReplyReply
  28. neojohan says:

    Thanks Man!

    ReplyReply
  29. dot Blog. The week in links 08/02/10 says:

    [...] How to use any font on the web (interactiveblend​.com) [...]

  30. KJ says:

    Have been using sIFR for a while but replaced it recently on a few sites with Cufon. But yeah, the licenses on some fonts do make it a little troublesome.

    ReplyReply
  31. Stephen walker says:

    This is old hat. Join the web type revolution at typekit.com !
    Unbelieveable.

    ReplyReply
  32. Tweets that mention How to Use Any Font on the Web | The Interactive Wall -- Topsy.com says:

    [...] This post was mentioned on Twitter by . said: [...]

  33. Louis Gubitosi says:

    @Stephen walker: only the basic package for typekit is free, correct? I’d rather create my own and not pay some service.

    ReplyReply
  34. Thomas says:

    Cufon Is my choice of font replacement!

    ReplyReply
  35. Kawika says:

    Awesome information. @font-face is going to revolutionize the web!

    ReplyReply
  36. UGG Boots says:

    This article was helpful in a paper I am writing for my thesis.

    Thanks

    Bernice Franklin

    UGG Boots
    UGG Purses
    Classic Tall Chestnut

    ReplyReply
  37. dnnsldr says:

    been using @font-face for awhile for our commercial projects. Just have to check the licensing requirements for the font and make sure you are not violating it. We take this into consideration when we are designing sites.

    ReplyReply
  38. sanj says:

    thanks for the @font-face share.

    ReplyReply

Post Comments

(required)
(required)
 

Get your own gravatar for free »