【发布时间】:2012-11-13 17:01:14
【问题描述】:
我绝对没有成功让 IE 10 显示自定义字体。还有其他人对此有解决方案吗?我可以在网上看到一些喊话,说其他人在 IE 10 中的字体有问题,但没有找到解决方案或确认的错误。
任何有相同经验或解决方案的人?
这就是我现在所拥有的,它在 IE 10 之前,Chrome 和 Safari 中运行良好:
@font-face {
font-family: "LCD";
src: url('http://www.somedomain.xxx/Public/Fonts/Quartz_Regular.ttf');
}
<!--[if IE]>
<style type="text/css">
@font-face {
font-family: "LCD";
src: url('http://www.somedomain.xxx/Public/Fonts/Quartz_Regular.eot');
}
</style>
<![endif]-->
我尝试用 woff、ott 等其他格式的字体文件替换,但完全没有运气。
暗示字体松鼠的答案使它工作。 现在工作标记(对于 IE 10)是:
@font-face {
font-family: "LCD";
src: url('/Public/Fonts/quartz_regular-webfont.eot');
src: url('/Public/Fonts/quartz_regular-webfont.eot?#iefix') format('embedded-opentype'),
url('/Public/Fonts/quartz_regular-webfont.woff') format('woff'),
url('/Public/Fonts/quartz_regular-webfont.ttf') format('truetype'),
url('/Public/Fonts/quartz_regular-webfont.svg#quartzregular') format('svg');
font-weight: normal;
font-style: normal;
}
【问题讨论】:
-
你不能嵌套
<style>标签。 -
也许你想看看这个 - steveworkman.com/tag/web-fonts
标签: font-face internet-explorer-10