How to Use Custom Font By CSS

Most of the programmer use Machine font like Verdana, Aria, Tahoma, Times New Roman, Georgia, Trebuchet MS etc...This is because Every Operating system have this font. But They never use other font Like "OCR A Extended" , "Tempus Sans ITC" etc. If anybody wants to use these fonts then they needs to paste this font into the Server, And by css they can use that font into their website.
First paste the font into your website with proper location/path. e.g :- I have paste "OCR A Extended.ttf" file into a font folder then I wrote my css like the example given below.

@font-face {
 font-family: OCR;
 src: url(../fonts/OCR A Extended.ttf); /* For IE */
 src: url(../fonts/OCR A Extended.ttf) format("opentype");
 /* For non-IE */


You can change URL/path according to your website . Now you can see the effect in every Operating System

1 comment:

  1. You have a nice article.Have a great day my friends.