Question

I think if we can match swf size with original text width's then rendering will be fast.

Was it helpful?

Solution

The font-replacement flash generated by sIFR takes the same space as the replaced HTML element. So if for example the text you are replacing is inside of an h1 tag, sIFR will take up the whole space of that h1 element and not the space of the text inside of it.

I guess the element that you are replacing has a width of 100%. You can set a border on it (style="border: solid 1px black;") so you can see the bounds of the element.

OTHER TIPS

Getting SIFR to be rendered in the exact layout (except for the font) is always challenging.

You might get some hints/helps here:
SO - SIFR 3 text resizing to fit width
sIFR Width Problem
Font Sizing with sIFR

sIFR text might take up more space (or less!) because the font is different than the HTML font. You can influence the width of the HTML text using letter-spacing in a CSS rule prefixed with .sIFR-active.

If you are having difficulty with sIFR, you might try Cufon instead. It's very easy to integrate and gives very good results.

To be on the right side of the law, you have to make sure that the fonts you use allow web embedding. You can read more about it here -

You should also look into Typekit here. Typekit is an elegant, although not free, solution from Jeff Veen and Small Batch:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top