【问题标题】:@font-face on Internet Explorer 9 on Xbox 360?@font-face 在 Xbox 360 上的 Internet Explorer 9 上?
【发布时间】:2015-04-15 02:07:10
【问题描述】:

我正在尝试在 Xbox 360 上的 IE9 上加载字体。它在普通的 Windows 7/Internet Explorer 9 机器上运行良好,但在 Xbox 上却不行。有谁知道加载字体的诀窍是什么?

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Medium.eot") format("embedded-opentype"), url("../fonts/Gotham-Medium.otf") format("opentype"), url("../fonts/Gotham-Medium.woff") format("woff"), url("../fonts/Gotham-Medium.ttf") format("truetype"), url("../fonts/Gotham-Medium.svg#Gotham") format("svg");
  font-weight: normal;
  font-style: normal; 
}

body {
  font-family: "Gotham";
}

– 更新–

我尝试删除除 woff 和 ttf 之外的所有字体格式:

@font-face {
  font-family: "Gotham";
  src: url("../fonts/Gotham-Medium.woff") format("woff"), url("../fonts/Gotham-Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal; }

但 IE9 仍然显示 times new roman 作为字体。

【问题讨论】:

  • 您在哪里托管 Web 服务器?在 xbox 中还是在另一个系统中?
  • 已经尝试了各种方法。 Internet Web 服务器 (nginx)、S3、本地 Web 服务器 (gulp),全部仅 HTTP。字体已正确提供(应用程序/font-woff)。适用于 IE9、10、Chrome、Safari ......只是不适用于 Xbox。
  • 对不起,我现在没有 Xbox,所以我非常想把这个问题形象化。文档模式是否设置为边缘?由于我假设您在 Intranet 上进行测试,因此 IE 会跳转到兼容性视图,因此它会进入不支持字体的 ie6 标准
  • 请告诉我这是否有帮助::: 转到 IE 中的设置 -> 兼容性视图设置 -> 取消选中“在兼容性视图中显示 Intranet 站点”选项。也就是说,如果您正在测试 Intranet 站点
  • 是的,元标签设置为 IE9 和 edge。 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=9" />。由于托管在 Web 服务器上时是相同的,因此我认为不会跳入兼容模式。

标签: html css internet-explorer xbox360 xbox


【解决方案1】:

基于链接here 和MSDN here 中的官方文档。它说不支持 .eot 文件。所以我的建议是使用“.woff”或“.ttf”文件类型的字体使用@font-face。

希望这会有所帮助。 编码愉快 :)

【讨论】:

  • 我在定义中有 .woff 和 .ttf 文件。如果 .eot 不起作用,它应该自动回退到 .otf、.woff 等。不是吗?
  • 尝试重新排序字体类型并检查位置是否正确。开发者控制台有错误吗?
  • 还有网站/页面托管在哪里?
  • 它在 S3 上。应该不是问题。
  • 运气不好。请参阅上述问题中的更新。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-28
  • 2013-03-07
  • 1970-01-01
  • 2019-01-02
  • 1970-01-01
相关资源
最近更新 更多