css - @font-face 在 IE8 中使用仿斜体

标签 css internet-explorer-8 font-face

我一直在遵循这篇文章中关于@font-face 的防弹说明 http://coding.smashingmagazine.com/2013/02/14/setting-weights-and-styles-at-font-face-declaration/comment-page-1/#comment-870111

不幸的是,我的网络字体在 IE8 中仍然出现仿斜体,因为如果字体由于某种原因没有加载,我会尝试考虑我的后备字体的样式。

我正在使用 Pacifico 脚本字体(在本地提供),我想确保它降级为衬线斜体。我偷偷在我的@font-face 中将其声明为 font-style:italic。

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

}

此 h1 样式可以正确加载字体,但在 IE8 中,脚本会变成仿斜体。

 h1{
font-family: 'Pacifico', serif;
font-weight: 500;
font-style: italic;
font-size: 32px;
color: #f9a51a;

很确定我已经正确地遵循了所有说明:(。在 Chrome 和 Firefox 中一切都按预期工作 - 我所做的@font-face 声明确实阻止了虚假样式。但我担心 IE8 没有完美的解决方案.

(澄清一下——IE9 似乎可以正确呈现 webfont 和后备字体/样式。)

最佳答案

这个字体有issues with acute characters .我花了几天时间来追踪我的 css 中的错误,最终发现它是 webfont。它一直在 IE8 中打开兼容性 View ,或者使 IETester 崩溃。

遗憾的是,唯一的解决办法是使用另一种字体,直到字体作者更新它并解决问题。

关于css - @font-face 在 IE8 中使用仿斜体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16432470/

相关文章:

wordpress - 字体字重渲染问题

css - 阻止 CSS * 继承特定元素及其子元素

html - 屏幕中心的 Center Div

<=IE8 的 CSS3 有效 'opacity'

jquery - IE8 XSS/Jquery 问题

html - @font-face 的 CSS 问题

css - IE 11 - 屏幕字体、媒体类型的打印字体不起作用

javascript - 在两列 Highcharts 中显示图例项

css - Firefox 不遵守溢出 : hidden

internet-explorer - 兼容模式下的 IE8 是否像 IE7 一样显示网页?