Cufón font loading after page loads

166 Views Asked by At

I have a site I'm building, here: http://ericbrockmanwebsites.com/dev2/

I'm using Cufón because the font the client wants doesn't look very good when the user is on a Microsoft system or on Chrome. SEO is not important as it's, for the most part, not really open to the public.

The problem is that the page loads with the default font and then the cufón script kicks in a second or so later - every time a new page is loaded. Just ended up looking very sloppy.

Does anyone how to remedy this?

Any help is greatly appreciated! cheers,

2

There are 2 best solutions below

0
Chris Quinn On

I found this answer works well, since you're using jQuery: Cufon delay in Internet Explorer

You essentially hide the text until it's rendered correctly.

2
Joe Buckle On

How about hiding all the content until the content is loaded? ie...

In CSS, hide the body

body { display:none; }

Then in jQuery when everything is loaded and the window is ready

jQuery(window).ready(function() {
  jQuery('body').css({
    'display':'block'
  });
});

If the website takes a little while to load you might want to consider using a pre loader instead.