Alex
Alex

Reputation: 68396

Google fonts not displaying all the time

I'm using the import thing in my CSS, like this

@import url(http://fonts.googleapis.com/css?family=Kite+One);

But the font doesn't load all the time. I'm still working on the CSS and refreshing periodically. Is it because of that? Is there any way to fix this?

Upvotes: 0

Views: 202

Answers (2)

AnaMaria
AnaMaria

Reputation: 3621

If you are having issues with Web fonts, you need to take a look at this

Web Font Loader

The Web Font Loader is a JavaScript library that gives you more control over font loading than the Google Fonts API provides. The Web Font Loader also lets you use multiple web font providers. It was co-developed by Google and Typekit.

Upvotes: 1

Nitesh
Nitesh

Reputation: 15739

Instead of @import, you should add a link to your page by..

<link href='http://fonts.googleapis.com/css?family=Kite+One' rel='stylesheet' type='text/css'>

Then, add the font under the body element in your stylesheet using font-family.

For Instance,

body{font-family: 'Kite One', sans-serif;}

For further doubts, refer here.

It should work now.

Upvotes: 1

Related Questions