Reputation: 99
I am using Google fonts on my webpage but notice about 5% of the time the Google font seems to timeout and display the fallback font. So I stopped using it and I tried using @font-face with the downloaded font files on the server but I would have to add about 100 more lines of CSS for all the versions and load all the correct formats (.ttf,.eot etc) with the right CSS implementation. Too much of a headache. Is there a way I can tell the webpage to keep trying to get the font from Google until it loads? Or is there another solution?
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'>
<h1>Text</h1>
CSS
h1
{
font-family: 'Indie Flower', Georgia, sans-serif;
}
Upvotes: 1
Views: 1809
Reputation: 14216
Try the webfont loader
https://github.com/typekit/webfontloader
Little bit more set up but it works veery nicely and gives you a bit more control over loading fonts
Upvotes: 2