我需要使用字体ITC Avant garde Condensed Book和medium但我认为这是非标准字体,那么我该如何确保在客户端浏览器的网站上使用此字体?
答案 0 :(得分:1)
使用
@font-face
{
font-family: myFirstFont;
src: url('ITC_Avant_garde_Condensed_Book.ttf'),
url('ITC_Avant_garde_Condensed_Book.eot'); /* IE9 */
}
再次阅读here:
<强>记住强>
Internet Explorer 9,Firefox支持
@font-face
规则, Opera,Chrome和Safari。但是,Internet Explorer 9仅支持.eot类型字体 Firefox,Chrome,Safari和Opera支持.ttf和.otf类型的字体。
Internet Explorer 8及更早版本,不支持 @ font-face rule。
答案 1 :(得分:0)
您可以将字体放在服务器上,然后在CSS中使用它:
@font-face
{
font-family:myFamily;
src:url('your_source_here/fontName.ttf'),
url('your_source_here/fontName.eot');
}
由于IE8不支持@font-face
,因此您应该使用后备字体。
要获取不同格式的字体,您可以使用the webfont generator