سؤال

I use Google fonts quite a lot, especially ones like:-

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

Should these only be used for 'parts' of the web site or is it okay to use these for the content of the entire site?

body { background-color:#292828; font-family: 'Titillium Web',Arial, Helvetica, sans-serif; }

Also, is there any alternative/better ways to use custom fonts other than using Google fonts or images?

هل كانت مفيدة؟

المحلول

You can create your own webfonts, if you want.

There's webfont generators, and here's one.


And about your question about are google webfonts reliable?

Yes. Yes they're. Think it like this: When did Google go down? If it happens, it's probably the last thing you should care of.

نصائح أخرى

Google web-fonts are reliable. But if you want to use them and host them on your own server then simply go the stylesheet url. In your case, the urls is

http://fonts.googleapis.com/css?family=Titillium+Web:200

when you visit it then you will see another url in it as follow:

 @font-face {
  font-family: 'Titillium Web';
  font-style: normal;
  font-weight: 200;
  src: local('Titillium WebThin'), local('TitilliumWeb-Thin'), url(http://themes.googleusercontent.com/static/fonts/titilliumweb/v1/anMUvcNT0H1YN4FII8wpr3XqdloEk0Ij5qwGW4qO9RM.woff) format('woff');
}

after that, copy the url from it. in this case the url is:

http://themes.googleusercontent.com/static/fonts/titilliumweb/v1/anMUvcNT0H1YN4FII8wpr3XqdloEk0Ij5qwGW4qO9RM.woff

when u visit the url, a font file will get downloaded to your computer. upload that file to your web server and include it in your style sheet as follow:

    @font-face {
  font-family: 'any name of the font you wnat';

  src: url(the url to your file on your own server just like u link to  an image);
}

Now after inclusion, you can use it anywhere on your site where you desire and where the stylesheet is included by calling font-family: the name of the font you used above;

Any doubt, please ask :)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top