【问题标题】:IE10: @font-face doesn't workIE10:@font-face 不起作用
【发布时间】:2023-03-25 20:49:01
【问题描述】:

我无法让这些字体在 IE10.Windows 8 上运行(尽管它在 safari 上运行良好)。

有什么想法吗?

<head>
<style>
@font-face {
    font-family: 'Open Sans Condensed Light';
    font-style: normal;
    font-weight: 300;
    src: local('Open Sans Condensed Light'), local('OpenSans-CondensedLight'), url(rsc/fonts/opensanscondensedlight.ttf) format('truetype');
}
@font-face {
    font-family: 'Open Sans Condensed Bold';
    font-style: normal;
    font-weight: 700;
    src: local('Open Sans Condensed Bold'), local('OpenSans-CondensedBold'), url(rsc/fonts/opensanscondensedbold.ttf) format('truetype');
}
</style>

[更新 1]

这里是 jsFiddle http://jsfiddle.net/stephanedeluca/f3hduskv/

[更新 2]

在 ttf 文件上有一个 404,我不明白。网址没问题。但有一件事:类型显示为文本/html。 IIS 上用于 rtf 的 mime 类型是已知的。

【问题讨论】:

标签: css html fonts internet-explorer-10


【解决方案1】:

IE10 是否禁用字体下载?它在 Internet Explorer 的设置中:安全设置-Internet 区域 > 下载 > 字体下载。选项有启用、禁用和提示。如果禁用,您将一无所获。

【讨论】:

  • 我已经检查过了:它已启用。 (我提供了一个 jsFiddle)
  • 您是否在开发者控制台 (F12) 中看到任何错误?您是否还在“网络”选项卡中看到文件下载尝试?
  • 你说得对,我得到了 404,但我真的不知道为什么。我把相关的屏幕截图作为@Richard Edwards 问题的更新
  • 但是……如果你从小提琴(没有 404)运行它并且字体不正确。
  • 我收到 '@font-face failed OpenType 嵌入权限检查。权限必须是可安装的”。我想我读到 IE10 需要 ttf 的 DRM 信息。检查这个问题,stackoverflow.com/questions/15744026/…
猜你喜欢
  • 1970-01-01
  • 2012-08-19
  • 2012-01-05
  • 1970-01-01
  • 2014-05-19
  • 2013-01-04
  • 2014-09-16
  • 2018-05-27
  • 2015-01-25
相关资源
最近更新 更多