css - @font-face 被 IE7 忽略

标签 css fonts font-face

我已经使用 Font Squirrel 创建了一个@font-face css 规则和所有字体格式并且在我目前测试过的所有浏览器上都能正常工作,但在 IE7 上不行。字体似乎根本没有加载。

您可以在 http://grupogamma.socialsnack.com/ 查看现场直播

@font-face 规则在 http://grupogamma.socialsnack.com/wp-content/themes/gamma/style.css 上字体在 http://grupogamma.socialsnack.com/fonts/

由 Font Squirrel 生成的我的 css 片段:

@font-face {
    font-family: 'UniversCondensedLight';
    src: url('/fonts/univers-condensedlight-webfont.eot');
    src: url('/fonts/univers-condensedlight-webfont.eot?#iefix') format('eot'),
         url('/fonts/univers-condensedlight-webfont.woff') format('woff'),
         url('/fonts/univers-condensedlight-webfont.ttf') format('truetype'),
         url('/fonts/univers-condensedlight-webfont.svg#webfonteM3WTEhs') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'UniversCondensed';
    src: url('/fonts/univers-condensed-webfont.eot');
    src: url('/fonts/univers-condensed-webfont.eot?#iefix') format('eot'),
         url('/fonts/univers-condensed-webfont.woff') format('woff'),
         url('/fonts/univers-condensed-webfont.ttf') format('truetype'),
         url('/fonts/univers-condensed-webfont.svg#webfontPDfnu2z9') format('svg');
    font-weight: normal;
    font-style: normal;

}

编辑:

通过使用 Wireshark,我能够验证字体 .eot 确实已加载,并返回 200 OK。内容类型是 application/vnd.ms-fontobject。因此字体已加载,但未使用/未正确呈现。

最佳答案

我的 css 中似乎还有其他东西使 IE7 表现不佳(令人震惊!)

谢天谢地,使用一些神奇的仙尘(缩放:1)解决了这个问题。

关于css - @font-face 被 IE7 忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5576616/

相关文章:

javascript - 在 curl 返回中隔离 css/head/etc

c - 如何在 C 中移动 FTGL 中的文本?

css - IE 10 不加载字体

css - Firefox mac (CSS) 深色背景上的错误字体平滑

font-face - @font-face 字体在切换应用程序/标签时卸载

css - 兄弟元素影响 div 可见性

javascript - 旋转椭圆形 SVG 对象

html - flexbox 可以处理不同大小的列但一致的行高吗?

java - 如何在 SWT 中从 InputStream 加载字体?

html - 使用 bootstrap 3 的字体在 Google Chrome 和 Firefox 中不起作用