【发布时间】:2014-05-04 23:31:04
【问题描述】:
.css
@font-face {
font-family: 'NanumBarunGothic';
src: url(NanumBarunGothic.eot);
src: url(NanumBarunGothic.eot?#iefix) format(‘embedded-opentype’),
url(NanumBarunGothic.woff) format(‘woff’),
url(NanumBarunGothic.ttf) format('truetype');
}
@font-face {
font-family: 'NanumBarunGothic';
src: url(NanumBarunGothicBold.eot);
src: url(NanumBarunGothicBold.eot?#iefix) format(‘embedded-opentype’),
url(NanumBarunGothicBold.woff) format(‘woff’),
url(NanumBarunGothicBold.ttf) format('truetype');
font-weight: bold;
}
.htaccess
Addtype application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woof
这是我的语法。 IE没问题。完美加载.eot。 但是 Safari、Chrome 加载 .ttf 字体。为什么? 那里有什么错误的语法吗?
【问题讨论】:
-
我看到 woff 格式的奇怪单引号和 truetype 的普通单引号。也许这就是问题所在。 Embedded-opentype 也使用相同的单引号。
-
@WojtekSurowka 你说得对。这有点奇怪。谢谢。
标签: internet-explorer google-chrome safari truetype woff