Fix Cufon Flickering Render

If you’re using the Cufon font-replacement library, you may have noticed that with your text being replaced, you notice a flicker before Cufon takes over and renders your custom font. In IE (especially IE7 with Cufon), adding one more line of Cufon code is necessary to help prevent, or at least make the time shorter for the flickering effect to be shown.

The Cufon javascript library has a built in function, Now(), that will allow the DOM to be “notified” that it’s ready to start replacing. You’ll want to try and place this line of code toward the bottom of your page, typically right before the close body tag, as shown below. This method should reduce or remove the Cufon flickering.

Here’s how it’s done:

<script type="text/javascript">; </script>
Posted in HTML, Javascript