这里有什么问题吗?
这是添加的 CSS。
@font-face {
font-family: NeutraText-Book;
src: url('../fonts/NeutraText/NeutraText-Book.eot'); /* IE9 Compat Modes */
src: url('../fonts/NeutraText/NeutraText-Book.eot?#iefix') format('embedded-opentype');
src: url('../fonts/NeutraText/NeutraText-Book.otf');
src: url('../fonts/NeutraText/NeutraText-Book.otf') format('opentype');
font-weight: normal;
font-style: normal;
}
相对 URL 是正确的,因为它们适用于 Firefox 和 Chrome。
我使用以下工具将 .ttf 转换为 .eot http://ttf2eot.sebastiankippe.com/
我使用的是 Internet Explorer v10,它显示的是另一种字体,看起来像 Verdana 之类的。
IE 说:
CSS3111: @font-face encountered a unknown error
NeutraText-Book.otf
CSS3114: @font-face failed with the control of OpenType-embedd permission. Permission must be installable.
NeutraText-Book.otf
(从我的主要语言翻译我自己)。
最佳答案
浏览器可能会以不同的方式在不同程度上检查是否根据许可条件使用了嵌入字体(网络字体、@font-face
字体)。这似乎是这里的情况,因为第二条错误消息说得很清楚。
联系字体供应商了解使用条件并可能购买许可用作嵌入字体的版本,或者尝试找到一些允许用作嵌入字体的替代字体,例如许多 Google 字体之一.
关于css - 字体,Internet Explorer 显示错误的字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24531033/