目前我使用@font-face
与不支持的浏览器回退:覆盖字体重量@字体面
@font-face
{
font-family: TheSansBlack;
src: local(TheSansBlack), url(../fonts/TheSans_TT9_.woff) format('woff');
}
font-family: TheSansBlack, Arial, Verdana, Helvetica, sans-serif;
在某些情况下,备用要大胆,所以我有一些CSS的符号,如:
#foo
{
font-family: TheSansBlack, Arial, Verdana, Helvetica, sans-serif;
font-weight: bold;
}
而且因为我使用了一个名为字体TheSansBlack
没有必要设置font-weight: bold
但是这是不行的:
@font-face
{
font-family: TheSansBlack;
font-weight: normal;
src: local(TheSansBlack), url(../fonts/TheSans_TT9_.woff) format('woff');
}
它仍然显示了大胆的其中一个相貌丑陋,因为它是双大胆与TheSansBlack ... 我只需要字体重量设置为粗体的回退,而不是WOFF字体。
编辑:我也试过这个没有成功:
@font-face
{
font-family: TheSansBlack;
src: local(TheSansBlack), url(../fonts/TheSans_TT9_.woff) format('woff');
#foo
{
font-weight: normal !important;
}
}
#foo
{
font-family: TheSansBlack, Arial, Verdana, Helvetica, sans-serif;
font-weight: bold;
}
嗨,你可以把HTML代码和jsfiddle链接? – 2012-04-02 11:54:44
@azad如何使用非自由字体做到这一点? ;-)是不是没用了呢? – dtrunk 2012-04-02 12:15:21