views:

784

answers:

9

Answered

The best answer below was good for the bounty, but user Aaron's answer is the correct answer. Setting:

.sIFR-flash {
width:100%;
}

corrects the issue in Chrome. Sadly, I cannot change my best answer as I guess that's how bounties work.

Answered


I seem to be having some issues with Chrome specifically rendering sIFR replaced text stretched out (and blurry) in it's flash container. No other browser does this (looks good in IE6,7,8, FF, Safari, Opera). Is this a known bug/does anyone have a workaround?

Here's an example you can look at on this site: http://uvph.com/

And here's the replace code:

// -- configure sifr
var futura = { src: '/swf/bfuturah.swf' };

sIFR.activate(futura);

sIFR.replace(futura, {
    css: [
        '.sIFR-root { background-color:transparent; color: #999999; font-size:24px; text-transform:uppercase; }'
    ],
    fitExactly      : true,
    forceClear      : true,
    forceSingleLine : true,
    selector        : 'h2',
    transparent     : true
});
A: 

I suspect it's something odd between Chrome and the Flash player. It's as if the Flash movie is scaled up incorrectly. The movie fixes itself when you click on it.

What if you set sIFR.useDomLoaded = false before sIFR.activate()?

Mark Wubben
No dice, useDomLoaded has no effect.
Typeoneerror
Any chance you can reproduce this in a standalone page? No other HTML, CSS, replacements etc?
Mark Wubben
Yeah, I'll give it a shot this weekend.
Typeoneerror
Removed all css and js except sifr and it still seems to happen.
Typeoneerror
Do you have a copy of that online somewhere?
Mark Wubben
+1  A: 

Use @font-face property of CSS. It is now supported across all popular browsers(including IE and Chrome). http://www.useragentman.com/blog/2009/09/20/font-face-in-depth/ has a very good post about using @font-face across all browsers and the page itself uses custom fonts. Worth checking =)

BYK
Agreed. Don't serve sIFR to browsers that can support @font-face. If you're going to use sIFR or friends, have your server only serve them to browsers that need it (older IE, mostly).
Paul McMillan
Apparently they insist on non-CSS solutions. I'm sure they have a good reason but still, if you have time to read that article, it'll make your life much better for custom fonts =)
BYK
It is what it is gentlemen. I typically use Cufon but this site was made before Chrome was in release.
Typeoneerror
+1  A: 

hmmm this is a really strange one. i've uploaded a testcase of your site to my server and everything works fine in chrome http://stuff.antpaw.de/test/ . the much better alternative to sifr is http://cufon.shoqolate.com/generate/ its much smaller and much faster, but you cant select the text anymore

antpaw
Weird. Well, you fixed it so you get the bounty for now :) The background image isn't loading in your test so maybe it's that.
Typeoneerror
+1  A: 

I noticed that setting the width of .sIFR-flash to 100% seems to correct the issue. Mark, if you're still monitoring this thread, does this make any sense to you at all? Thanks in advance, as it's happening to a site we implemented sIFR on as well.

Aaron Mentele
Nice, can't wait to try this.
Typeoneerror
Sorry it took me so long. This is, indeed the correct answer. I guess I cannot change my "best answer" since it was a bounty. Thanks, Aaron.
Typeoneerror
A: 

I am having the same problem, has anyone worked out how to fix this?

Thanks,

Tom

Tom
A: 

Hi all,

I too face the same problem. I.e. SIFR replaced text stretched out/blurry in its flash container. This issue is only with Chrome browser in Mac.

Can any one share the fix for this?

Thanks,

TS.

A: 

Same problem, i have this problem in a menu and it only appear in mac in chrome.

I disabled the sifr menu if the visitor uses mac & chrome so it shows noflash version if someone enters the webpage with the lacking browser.

Hope someone can fix this soon?

// J

FlashDeveloper
A: 

Yup, looking for a fix to this as well. Setting .sIFR-flash width to 100% does nothing.

Sean
+1  A: 

First of all: set "forceSingleLine" to "false". If this still doesn't help: check the CSS properties of the text you want to be rendered. Display-type of the rendered element itself (not the parent!) should be "block", otherwise "width: 100%" has no effect at all. The best results for Chrome can be achieved if sIFR is applied to a block element with fixed width - but this approach will not always be feasible.

Konstantin