sorccu / cufon

Fast text replacement with canvas and VML - no Flash or images required.
http://cufon.shoqolate.com
MIT License
2.09k stars 237 forks source link

Text flickers between Non-Cufon / Cufon On Page Load #168

Closed tomhole closed 13 years ago

tomhole commented 13 years ago

This has been driving me nuts and I was wondering if anyone had a solution.

I have used Cufon on a couple of sites with no issues at all.

I have been helping out a friend put together his photography portfolio and used Cufon for the fonts. You can view the site here: http://matthewtown.co.uk

But, across all browsers, you will notice that once the site has loaded, once you select a new page to navigate to, there is a microsecond flicker before cufon loads?

I have tried various fixes from the API documentation and forum. Any one have any ideas how to stop this happening?

sorccu commented 13 years ago

You have a JS syntax error on all your pages. I would start by fixing it first.

Next, I would fix your unclosed A tags: http://validator.w3.org/check?uri=http://matthewtown.co.uk/index.php%3F/people/people/&charset=(detect+automatically)&doctype=Inline&group=0.

After that, I would move jquery.js before cufon-yui.js - it should have nothing to do with the flickering but your #menu selector will not work in IE 6-7.

Then, I would change the #menu selector to perhaps "#menu li" as it will fix some of your spacing issues. And if you care about line-height, you should change to a strict (or html5) doctype.

If you do all that and it still doesn't work, just add this to your CSS and it should be fine:

.cufon-loading body { visibility: hidden }

I'm closing the ticket as there's pretty much nothing else you can do. Hope you get it fixed.

tomhole commented 13 years ago

Thanks for pointing out the open . Completely missed that

The: ".cufon-loading body { visibility: hidden }" added to the CSS worked perfectly.

Really appreciate the help

mayureshgoyal commented 11 years ago

thanks :)

gokmenkurtoglu commented 11 years ago

so helpful. Thanks for this :)