views:

422

answers:

1

I'm using cufon for font replacement with jQuery for a site built on-top of drupal with a couple modules that tack on its own JS files. There seems to be a flicker in the text that I have cufon applied to. I'm profiling my JS in firebug and it looks like cufon is taking forever to load.

A couple things that I've tried:

  • adding cufon.now before the closing body tag
  • moved any cufon.replace from within $(document).ready() to including the bit of JS right after that element on the page.

None of that seems to be helping the delay. Does anybody have any suggestions?

A: 

Sure there is, add this just before </body> tag:

<script type="text/javascript"> Cufon.now(); </script>

Cufon.now will speed up the font loading, as well as prevent "flickering"

Emil