【发布时间】:2013-06-11 13:46:16
【问题描述】:
我遇到了一个奇怪的 chrome 问题。
我正在使用 @font-face 加载自定义字体:
@font-face {
font-family: 'AlexBrushRegular';
src: url('AlexBrush-Regular-OTF-webfont.eot');
src: url('AlexBrush-Regular-OTF-webfont.eot?#iefix') format('embedded-opentype'),
url('AlexBrush-Regular-OTF-webfont.woff') format('woff'),
url('AlexBrush-Regular-OTF-webfont.ttf') format('truetype'),
url('AlexBrush-Regular-OTF-webfont.svg#AlexBrushRegular') format('svg');
font-weight: normal;
font-style: normal;
}
我使用了 Font Squirrel Font Face 生成器,在演示页面上效果很好。
但是当我将这个 css 和字体放入我的应用程序(带有 require.js 的单页应用程序)时,页面不会呈现。字体已正确加载(请求为 200 OK):
我认为这是与 chrome 相关的问题,因为它适用于 Safari。
我尝试在没有本地服务器的情况下加载我的页面:file:///www/index.html,它可以在 Chrome 中运行。
任何意见表示赞赏。
谢谢。
蒂博
【问题讨论】:
-
似乎在当前版本的 Chrome 中已修复
标签: font-face