How to Use External Font

Using External Font is very Easy

1.Download the font

2.If the Downloaded font is in ttf format convert it into eot format by a tool which you have to search and download or use this online convertor    http://www.kirsle.net/wizards/ttf2eot.cgi

3.If the Downloaded file is in otf format convert it into ttf format and then convert it into eot

4. Both ttf and eot is need. ttf is supported by most browser but IE didn’t support ttf so we need eot format

5.In your css just do the follwing

@font-face {
font-family: “family:androidfont”;
font-style: normal;
src: url(foldername/filename.eot); /*if IE */
src: local(“font-name”), url(“foldername/filename.ttf”) format(“truetype”); /* non-IE */
6. Use the font in your file like below
body{
font-family:androidfont; Notes:Note the word androidfont this is the font-name i used in the above code it is user defined one so what you defined in the above code that you can use here
font-size:13px;
color:black;
}

Permanent link to this article: https://blog.openshell.in/2011/01/how-to-use-external-font/

Leave a Reply

Your email address will not be published.