Use of @font-face – Import Fonts To Your Web Application

I was little amazed when i first used @font-face. its great and little slow thing for your website but its help me great, because i used it when i was having a purchased font. its only the choice remaining when you will not find a font in font list or Google fonts. Google fonts is another great way to call some font and use that in your application. but that one is also little slow when page loads. if sometime calling fails, then your web application will show defaults fonts other than Google fonts. and also may be some of you also heard about Cufón, then don’t use use that shit. lot of things may be helpful about Cufon but not actually suggested.

let’s move further to @font-face. you got a custom font or buy it on internet and have a plan to use it in your web application. then you must consider @font-face. in this example i am using Gotham HTF. its not free font. this type of cases you may need @font-face.

Put this code to your style-sheet and do modifications according to your needs.

in above you may declare font-family of your choice and for Source give url of font where its exist. here you may notice that for IE browser we need to convert our font to .eot extension . you can convert you font from .ttf to .eot on this Website. after converting this will also provide you code i have pasted above. in above code first source is for IE browsers and 2nd source is for CSS3 browsers.

Now you are ready to use this font in your style-sheet or wherever you want.

You may also can use:

You will notice one thing i already told you, it will make your website little slow. but its great choice for you when you are using it in you application easily.

  • John Short

     Thanks So much..
    I find what i was looking for… really helpful.