Cufon:An Alternative Font Replacement
Over the last few years, I've enjoyed using the excellent sIFR technology to enhance the typography of headers and certain links.In fact, the headers on the home page of this site for the last year or so have been rendered with it. But I have to admit it's never been terribly easy to implement. As of today, I've started using a new solution called Cufon.
Which uses SVG and VML along with the <canvas> element to render the font. The one major drawback for me is that text isn’t selectable, but the developers are working on it and there should be a fix soon. It’s ridiculously easy to implement:
First, download the javascript files from gitHub. Next, you can use their font generator to create the neccesary code. Once you have those two files, simply link to them in the head of your document:
<script src="cufon.js" type="text/javascript"></script> <script src="your_font_generated_javascript_file.js" type="text/javascript"></script>
And then simply activate it as follows:
Cufon.replace('h2');
Easy, right?