Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to use webfont with @font-face

How to use webfont with @font-face

Problem

I want to change the font in my application to a custom font but the following code is not working:

@font-face 
{
font-family: "ArnoProBold"; 
src: url("resources/fonts/ArnoProBold.ttf");
}
@font-face 
{
 font-family: "ArnoProCaption"; 
 src: url("resources/fonts/ArnoProCaption.ttf");
}
@font-face 
{
 font-family: "Arn";
 src: url("resources/fonts/ArnoProLightDisplay.ttf");
}
Problem courtesy of: Rithesh

Solution

Hey @Ritesh please try something like this,

@font-face {
   font-family: 'ArnoProBold';
   src: url('resources/fonts/your_file.eot');
   src: url('resources/fonts/fonts?#iefix') format('embedded-opentype'),
        url('resources/fonts/your_file.woff') format('woff'),
        url('resources/fonts/your_file.ttf') format('truetype'),
        url('resources/fonts/your_file.svg#ArnoProBold') format('svg');
   font-weight: normal;
   font-style: normal;
}

and so on.

I hope this helps. :)

Solution courtesy of: hekomobile

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How to use webfont with @font-face

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×