Hacking sIFR 2’s Font Replacement

sIFR 2 With sIFR 3 still in beta, let’s explore hacking sIFR 2 to behave with more of today’s Flash functionality.

To get started, download sIFR 2. A common complaint about sIFR font replacement is that the fonts look too pixelated or light. A quick trick to fixing this is to up the Flash version from 6 to 8. Edit “sifr.js” on line 7 change “var a=6” to “var a=8” so that we’re detecting for version 8. The fonts won’t look perfect, but they will be noticeably better.

Next, we can add letter-spacing functionality to sIFR. Open up “dont_customize_me.as” (don’t worry) and place this at line 92:

if (letterSpacing != null) fmt.letterSpacing = Number(letterSpacing);

With this technique we control the letter spacing using flash vars:


Finally, when you publish, make sure to export it for Flash version 8 with ActionScript 2.0. By upping both the Flash and AS versions, the font rendering gets considerably smoother.

Be Sociable, Share!

Tags: , , , ,