Technology Blog »
September 5, 2007
[ Edit 2 December 2008: anyone considering sIFR should also look at typeface.js. I don't think there's a WP plugin for it yet but I could be persuaded to write one for a suitable reward. ]
[Edit 11 June 2008: this post is somewhat out of date as I've now stopped using sIFR on this site. I got rather fed up with its imperfections to be honest. ]
The typography of this site was looking a little dull, so I thought it might be nice to use sIFR to jazz things up a little. sIFR – which stands for the rather daunting-sounding Scalable Inman Flash Replacement – uses a some neat trickery, a combination of Flash, Javascript and CSS, to change fonts on a page dynamically when it is loaded. This means you can use heading fonts which are
A BIT OFF THE WALL
without having the pain of creating substitute images for every item of text.
So, what does it take to get sIFR working with WordPress?
The first thing you need is the CG-Flashy Titles plugin. This makes getting sIFR working very straightforward indeed. The only problem I found was that to get things working you have to copy the “sifr” directory, which is the one where the the actual font files reside, from the folder belonging to CG-Flashy Titles to the main plugins one. So you end up with two copies of this directory, and, most importantly, all additional fonts you install have to be placed in both.
You’ll also want some font files, as the plugin only comes with two. If you have a copy of Adobe Flash CS3 then it’s not hard to create your own, but for the rest of us some help comes in the form of the libraries at FONTSMACK and Isarie. From the Isarie library I obtained ZapfElipt BT to use for headings and LyonesseTM for the descriptive tag line at the top of each page.
To configure CG-Flashy Titles (or any other sIFR plugin) you’ll need to understand CSS selectors. These are used to specify which text elements of your page are to be substituted. sIFR only works well with short text items, headings and the like. If the original and replacement fonts have similar characteristics you’ll generally get better results: if you’ve picked an unusual typeface then you may have to play with the settings to achieve something satisfactory.
You may also have to tweak your original HTML and CSS to get the best possible match between the original and replacement text objects. If the original element is floated and has margin and padding properties set then you are likely to encounter some of the trickier sIFR bugs: my advice is to wrap any such objects in a container and apply the complex CSS to the container rather than the one you are substituting. Keep the CSS properties of a sIFR-replaced object as simple as possible and you won’t go too far wrong.
All that being said, I found implementing sIFR on this site a rewarding experience and I’m pleased with the results. Until browsers become more type-aware, as they surely will, sIFR is surely the most practical way to enhance your site typograpically.