Found out how to dynamically create header text images!
Posted by Brad | Posted in Recommendations | Posted on 11-12-2009
If you are looking at the title tags on my blog from today you will notice they look utterly friggin’ beautiful. There is a javascript include called cufon that you upload a font to their site, select a couple of easy options, their site then generates a text file that converts your TTF fonts into a mumbo jumbo code their javascript understands.
Then the magic happens
Upload the generated file, the javascript framework file, and optionally a couple of extra customizations then wack code into your header and footer.
Add to header such as
<script src=”/js/cufon-yui.js” type=”text/javascript”></script>
<script src=”/js/bradfont3_700.font.js” type=”text/javascript”></script>
Add to footer such as
<script type=”text/javascript” src=”/js/cufon-config.js”></script>
Whats the point of all this?
Your regular text titles etc will be converted to super antialiased images on the fly in the browser for a super sleek custom font look, great for sites with a DB back end such as this wordpress blog!.
My cufon-config.js on day1 includes just this
Cufon.replace(‘h1′)(‘h2′)(‘h3′);
Cufon.now();
But that could change as I play with it more, but for now this is perfect.





