Cufon

Flash text solution sIFR may currently be the web developers favoured choice when it comes to font replacement, but the developers of Cufón aim to change that with this fast, flexible alternative.

Cufón’s website provides a font conversion program which converts fonts in to (encrypted) JavaScript files. Simply include the Cufón library and font JavaScript on your page, specify what you would like to convert and Cufón will do the rest.

The font generator is simple to use and provides a suitable way to secure your fonts

The font generator is simple to use and provides a suitable way to secure your fonts

In order to achieve popularity among the masses, the developers of Cufón set themselves some goals, all of which have now been met:

  1. No plug-ins required – it can only use features natively supported by the client
  2. Compatibility – it has to work on every major browser on the market
  3. Ease of use – no or near-zero configuration needed for standard use cases
  4. Speed – it has to be fast, even for sufficiently large amounts of text

By default Cufón uses CSS rules, but combined with popular frameworks such as jQuery, MooTools, Dojo or Prototype it can use the same selector statements automatically. The code for using Cufón is incredibly straightforward, proving it really does require near-zero configuration. The following code will render all H1 elements in Calibri:

<!DOCTYPE html>
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <script src="cufon-yui.js" type="text/javascript"></script>
      <script src="Calibri_700.font" type="text/javascript"></script>
      <script type="text/javascript"&gt
         Cufon.replace('h1');
      </script>
   </head>
   <body>
      <h1>This header is in Calibri.</h1>
   </body>
</html>

Cufón has a few advantages over Typeface.js, such as support for a greater number of browsers and font types. If you want to check out a sample of the two techniques output side-by-side, Kilian Valkhof has provided a comparison.

Check out Cufón

Info

Type:
Libraries, Tools
Tags:
Posted on:
July 7th, 2009
Posted by:
Andi Smith
Views:
1875

Rating

4.2

Your Rating:
1 Star2 Stars3 Stars4 Stars5 Stars

Works on

BETA Please let us know if you find Cufon works in other browsers by leaving a comment below.

Add comment

(required)
(required)
(will not be published)
(required)