我的网站的字体在Firefox中不受支持/识别 [英] My website has font that is not supported/recognized in Firefox
问题描述
我的网站没有显示相应的字体,PT Sans.ttc。我检查其他浏览器,它工作正常。
My website is not showing the appropriate font, PT Sans.ttc. I checked on other browsers and it works fine.
www.farmap-ux.com。下面是CSS代码。
www.farmap-ux.com. Below is CSS code.
@font-face
{
font-family: PT Sans;
font-family: font-family: 'PT Sans', sans-serif;
src: url("http://fonts.googleapis.com/css?family=PT+Sans")
}
所以它适用于所有像我说的(Chrome,Safari,甚至Opera!)任何想法?我试图找到.woff文件的字体,但我不认为它在我的字体书。
So it works on everything like I said (Chrome, Safari, even Opera!) Any ideas? I've tried to find .woff files for the font but I don't think it's in my Font Book.
推荐答案
也许是因为您的 @ font-face
有效。它应该是:
Maybe it's because your @font-face
declaration isn't valid at all. It should be something like:
@font-face
{
font-family: 'PT Sans';
font-style: normal;
font-weight: 400;
src: local('PT Sans'), local('PTSans-Regular'), url(http://themes.googleusercontent.com/static/fonts/ptsans/v4/LKf8nhXsWg5ybwEGXk8UBQ.woff) format('woff');
}
但是,最好使用google提供的CSS文件:
However, it's even better to use the CSS file provided by google:
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans">
如果你想坚持一个CSS导入使用
If you want to stick to a CSS import use
@import url(http://fonts.googleapis.com/css?family=PT+Sans);
这篇关于我的网站的字体在Firefox中不受支持/识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!