Fix for Cufon not working in IE9-beta


#1

Seen quite a few ppl asking about this sooo figured I’d throw it out there.

If you aren’t aware, with IE9 cufon doesn’t render anything at all, not even the actual text. I know beta software is beta, but Microsoft…

Fix:


or add


or download the latest nightly and replace your old cufon-yui.js with it.

#2

You’re the man! Thanks mate.


#3

Oh! now i understand, for the microsof guys, “beta” means:

“Be carefull, this is what we do, and this are the new bugs, so, start learning how to fix them!!! But we promise to fix them for the next beta10”


#4

Great work. It now works great.


#5
Oh! now i understand, for the microsof guys, "beta" means:

“Be carefull, this is what we do, and this are the new bugs, so, start learning how to fix them!!! But we promise to fix them for the next beta10”

No they will be fixed maybe in IE12 or so.


#6

Nice to see that IE9 is turning out to be every other version before it, lol!


#7

w00t, didn’t know about that.
I’m not installing IE9, I’m waiting for IE X :stuck_out_tongue:


#8

So they’ve brought new bugs now? Microsoft really knows how to do their job!

They’re bringing html5 and css3 support. So they thought it’s useless to keep js


#9
So they've brought new bugs now? Microsoft really knows how to do their job!

It’s a beta. I wouldn’t bother making changes to your sites until they get to RC2 or later.

A Microsoft beta is different than other companies that try and find as many bugs as possible before the beta is released. Microsoft let’s the community do that for them. Their beta just means they finished working on the core and primary engines. Now need us to do their job for them, finding the little bugs that are easy to fix.


#10

Hi folks,

Just a quick note to explain more on why older (pre 1.09i) versions of Cufon don’t work correctly with IE9.

The library depended on legacy, non-standard IE behavior fixed in IE9. The IE9 behavior is correct (as in, IE9 now behaves like all other browsers) and won’t change so we’ve worked with the Cufon authors on a fix for the library. And as we find sites affected by this, we contact them to let them know there’s an updated version of Cufon to use.

The gory details…

Cufon chooses an “engine” for rendering in registerEngine:

Cufon.registerEngine("vml", (function () {
    if (!document.namespaces) { //<------ browser detection
        return 
    }
   // build engine...
}

The check for document.namespaces is effectively an “if IE” check. IE supports document.namespaces, so the ‘vml’ engine is used instead of the ‘canvas’ engine. IE9 supports VML so that alone isn’t the problem.

However, the ‘vml’ engine depends on legacy IE behavior in two places:

  1. Cufon uses elem.unknownAttr = 'value' to set a unknown attribute, e.g.
                S.stroked = "f";
                S.coordsize = m;
                S.coordorigin = H = (q - o) + "," + p;
                S.path = (Z.d ? "m" + Z.d + "xe" : "") + "m" + H + e;
                S.fillcolor = a;
    
    Unlike IE8, IE9 treats these as script expando properties and not content attributes. If you replace these assignments with the standards-based setAttribute(A, B), it will work correctly.
  2. Cufon omits the unit 'px' in setting style properties, like 'width' and 'height'. Like other browsers, IE9 requires units on length values without unit.
While this gets the VML engine working in IE9, the best solution is using the latest-and-greatest: canvas. The canvas engine works great in IE9.

John Hrvatin
Program Manager, Internet Explorer


#11
dejans7 said

AAaaaAa official guy from Microsoft is here!!11 Let’s all make a wish, maybe MS can hear us through John Hrvatin!!!1 I start first:

Mister Hrvatin, to fix your FD (Firefox Downloader, or as some still call it - Internet Explorer), please just copy entire source code from mozilla firefox, opera or google chrome and paste it into IE browser, it will make this world a better place!

Regards,

angry developer who spent a lot of time in the past with your Firefox Downloaders (especially with FD 6, i really love that guy, he is always trying to be unique and creative)

(There, i had to say it! Microsoft, please don’t kill me, or sentence me to a lifetime of using FD, or something like that :crying: )

Hilarious!

+1, I spent a lot of time with FD in the past too. Apparently Microsoft was worried about web developers having too much time on their hands so they invented IE 6-8.


#12

My Sony VAIO came with Google Chrome preinstalled, so I haven’t had to touch Internet Explorer. This is why SONY or Apple products will always be my first pick - because they don’t make you use IE.


#13

Did any of you knuckle heads even read what that guy said? probably not right.


#14

Yes, i read his post, looks like whole IE9 is promising and that it will be better! But that doesn’t change the fact that i had great problems in the past with earlier versions of IE :slight_smile:

Btw someone flagged my ragepost :frowning: Fortunately you can read it in Parallelus’s quote :slight_smile:


#15
Mike343 said

Did any of you knuckle heads even read what that guy said? probably not right.

Yeah, I read what he said. Did you have a chance to look up the word ‘sarcasm’ yet?


#16
Parallelus said
Mike343 said

Did any of you knuckle heads even read what that guy said? probably not right.

Yeah, I read what he said. Did you have a chance to look up the word ‘sarcasm’ yet?

Exactly! :slight_smile:


#17

Thank you for the update file!


#18

Just make sure you have it covered as it’s in the latest Windows 7 important update list, so most people will automatically install the dam thing.

I was just ready to go live with a site and hadn’t chekced the ‘real’ version as I refuse to install it. My IE tester shows cufon fine in 9.


#20
angusmcleod said

I have three people contacted my this week as in IE9 they cannot see chunks of text on this site; http://amacoachingschool.org some of this text is in h4 Do I have to change my theme away from themeforest Unite to another, like ‘profits theme’ which I am using on another client site without such issues? thanks. Angus

You can fix the problem in under 2 minutes.

  1. Go to http://cufon.shoqolate.com/generate/ and click “Download” in the top navigation.

  2. Save that file as “cufon-yui.js”

  3. Copy the new file to “parallelus-unite/js” replacing the one in your theme’s directory.


#21

All IE can do is give us pain. :crying: