【发布时间】:2012-12-20 15:19:16
【问题描述】:
我已经在服务器上解决了这个问题,但在 Chrome 扩展程序中没有解决。
当我使用加载有@font-face 的自定义字体时,Chrome 会警告我。例如:
@font-face {
font-family: 'fontello';
src: url("../../fonts/fontello.svg#fontello") format('svg');
font-weight: normal;
font-style: normal;
}
Chrome 会这样告诉我:
Resource interpreted as Font but transferred with MIME type image/svg+xml: "fonts/fontello.svg#fontello"
所以在服务器上我可以强制为我的字体设置标题,但我可以在 Chrome 扩展中做什么? 任何类型的 Chrome 扩展程序魔法提前致谢。
【问题讨论】:
-
这也是优秀的 ChromeShowTitleTag 扩展的问题
-
刚遇到这个问题,但收到关于“text/plain”被用作 mime 类型的警告。我使用 Google Fonts 服务自己下载了这个字体,并将其存储在我的扩展目录中(加载为解压缩)。在 win8 x64 上使用 chrome dev 36。
-
不确定这是否有帮助:stackoverflow.com/questions/15521130/…
-
@97ldave,chrome 扩展中没有后端,所以没有
.htaccess之类的东西。 -
我不确定。您可以使用文件处理程序来解决问题吗? developer.chrome.com/apps/manifest/file_handlers 或 stackoverflow.com/questions/14713109/…
标签: google-chrome-extension font-face