7

我想将应用程序中的字体更改为自定义字体,但以下代码不起作用:

@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");
}
4

1 回答 1

10

嘿@Ritesh,请尝试这样的事情,

@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;
}

等等。

我希望这有帮助。:)

于 2012-07-14T07:58:44.543 回答