PXR + Cufon = Pxfon
Back in 2006 I created (but never released) PXR, a pixel-based alternative to IFR. I built a tool that could convert specially prepared gifs into a format that could then be used by the PXR JavaScript to generate and layout the pixel typeface. It was cute but impractical.
Fast-forward three years. Cufón is sIFR’s heir apparent. But in my quick tests Cufón wasn’t up to the challenge of generating a font.js from any of my pixel fonts. Even if it had, the result would probably have been marred by a pixel’s worst enemy, anti-aliasing.
So yesterday I cracked open a couple of Cufón-generated font.js files and the un-minified cufon.js to figure out how the pieces fit together. I was able to successfully reverse engineer the format and modify my original PXR generator to output Cufón-compatible font.js files.
You can play around with the generator on Pixel Portraits. I haven’t added any sort of error checking and the current outline tracing algorithm is remedial at best; it can only see characters one row at a time. That means it’s especially inefficient on larger pixel typefaces (anything greater than 18px tall). But it’s good enough for me.
With Pxfón I might even be able to carry over the pixel aesthetic from my new splash page to the entire site. That would be sure to confound the average Googler.