[英]Trouble with @font-face in IE
我正在尝试使用来自fontsquirrel.com的@ font-face工具包。 我直接从它们提供的文件中提取了所有内容,但是当使用开发人员工具在IE9中进行测试时,我得到了以下结果:
浏览器模式:IE9,文档模式:IE9标准-字体呈现正确
浏览器模式:IE8,文档模式:IE8标准-字体不呈现
浏览器模式:IE7,文档模式:IE7标准-字体不呈现
奇怪的是,当我从@ font-face工具包查看演示文件时,它在上述三种情况下都可以正确呈现。 就像我说的,一切都是从提供的文件中复制/粘贴。
我能想到的唯一区别是,我正在使用HTML5 Boilerplate。
任何想法将不胜感激。
回应评论:
这是字体: http : //www.fontsquirrel.com/fonts/bebas-neue
我正在使用的CSS:
@font-face {
font-family: "BebasNeueRegular";
src: url('BebasNeue-webfont.eot?') format('eot'),
url('BebasNeue-webfont.woff') format('woff'),
url('BebasNeue-webfont.ttf') format('truetype'),
url('BebasNeue-webfont.svg#webfontfvFLBU0N') format('svg');
font-weight: normal;
font-style: normal;
}
杰森(Jason),您的font-face
代码与我下载的工具包中的代码不太匹配。 注意第四行(我用一些注释的惊叹号标记)与您的不同。
@font-face {
font-family: 'BebasNeueRegular';
src: url('BebasNeue-webfont.eot');
src: url('BebasNeue-webfont.eot?#iefix') format('embedded-opentype'), /* !!! */
url('BebasNeue-webfont.woff') format('woff'),
url('BebasNeue-webfont.ttf') format('truetype'),
url('BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
font-weight: normal;
font-style: normal;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.