【发布时间】:2015-06-15 08:31:56
【问题描述】:
我想知道其他人是否遇到过这个问题 - @font-face 字体在 Chrome 中无法正确呈现,有时它们会,有时不会,这实际上是问题所在,因为我无法跟踪哪里出了问题我自己的。在其他浏览器中一切都很好。我正在使用 Icomoon 字体及其语法:
@font-face {
font-family: 'entypo';
src:url('/fonts/entypo.eot');
src:url('/fonts/entypo.eot?#iefix') format('embedded-opentype'),
url('/fonts/entypo.svg#entypo') format('svg'),
url('/fonts/entypo.woff') format('woff'),
url('/fonts/entypo.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/* Use the following CSS code if you want to use data attributes for inserting your icons */
[data-icon]:before {
font-family: 'entypo';
content: attr(data-icon);
speak: none;
font-weight: normal;
-webkit-font-smoothing: antialiased;
}
/* Use the following CSS code if you want to have a class per icon */
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: 'entypo';
font-style: normal;
speak: none;
font-weight: normal;
-webkit-font-smoothing: antialiased;
line-height:1;
}
字体文件夹中的.htaccess:
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
root .htaccess 也有同样的规则。
所以我不知道还有什么问题,并且弄乱了我的字体。 非常感谢您的帮助!
【问题讨论】:
-
您找到解决方案了吗?