HTML

<span style="font-family: 'blackjackregular'; font-size: 18pt;">My</span>
<span style="font-family: 'trajanpro'; font-size: 14pt;">WEST</span>

字体css:
@font-face {
    font-family: 'trajanpro';
    src: url('trajanpro-regular.eot');
    src: url('trajanpro-regular.eot?#iefix') format('embedded-opentype'),
         url('trajanpro-regular.woff') format('woff'),
         url('trajanpro-regular.ttf') format('truetype'),
         url('trajanpro-regular.svg#trajanpro_regular') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'blackjackregular';
    src: url('blackjar-webfont.eot');
    src: url('blackjar-webfont.eot?#iefix') format('embedded-opentype'),
         url('blackjar-webfont.woff') format('woff'),
         url('blackjar-webfont.ttf') format('truetype'),
         url('blackjar-webfont.svg#blackjackregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

IE 显示:

FF 和 Chrome 显示:

正如您所看到的 MY 在 IE 和其他浏览器中都是正确的,但为什么 WEST 不更改 IE 中的字体?

最佳答案

Trajan Pro 是 Adob​​e 的专有字体,可能没有将其嵌入为 Web 字体的许可证。用 @font-face 嵌入它可能违反了 EULA。要使用它,您需要使用 Typekit 之类的服务。请在此处查看详细信息:https://typekit.com/fonts/trajan-pro-3

编辑:

经过更多的挖掘,这里有一个有趣的 link ,说明 IE 在 EOT 文件中实现了一个限制字体使用的标志。其他浏览器未实现或计划实现此功能,因此行为有所不同。

关于html - 为什么一种字体在 IE 中可以使用,而另一种则不行,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21939820/

10-12 12:57
查看更多