Some time ago, thanks to a Breeze Presentation made by Danilo Celic, I first heard about sIFR and I liked it a lot.
sIFR is the smartest way to embed fonts I've found so far, but I find hard to remember all the params it can use and you can write a typo without notice (until you find out that it doesn't work!).
I thought that creating an extension would make things a bit simplier in some cases: The extension will allow you to work with almost all the parameters accepted by the sIFR, choose colors visually, define offset and padding values and write the path to the js and css files sIFR will use.
If you have used sIFR, you already know that the replace statement can be written directly on the document or attached to an event (99% of the times, body->onLoad). Well I decided that the former can be better (or, at least, it is the method that most people will use), so no event handling here. Just place your cursor after the element that should be replaced and use the Object created by the extension to write the statement.
Please notice: if you don't know how sIFR works, please read the manual on their site before using the extension!.
Here's how the Dialog window looks like:
- The first textfield will alow you to write the element(s) that will be replaced (eg: p, h1, div#pullquote, .myClass...). Again, remember to read sIFR documentation.
- Choose the swf containing the font using the second field.
- Choose the colors that sIFR will use with the swf font
- If the replacing element needs to have offsets or padding defined, write them in their boxes.
- Check the options you want to use: Center text, underline on hover or wmmode (not recommended at all but well, it's one option...)
- Finally, if you haven't defined the paths for the files sIFR uses (js file, print and screeen css), this fields will allow you to do so. They're just optional.
If fact, only the two first fields (element to be replaced and swf font) are required for sIFR to work.
Nothing else, just remember to read the docs and watch the Breeze Live presentation by Danilo Celic to learn about it.
1.0.2: original version
1.2.1: The sIFR.replaceElement() function called will be put at the end of the document by default (instead of the insertion point: I find the new position more useful)
Current Version is 1.2.1 Click here to download.