正确的MIME类型的字体 [英] Proper MIME type for fonts
本文介绍了正确的MIME类型的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
搜索网页时,我发现对于某种字体的正确MIME类型有不同的建议,但是我还没有尝试任何MIME类型,这种类型可以消除Chrome警告,如下所示:
资源解释为字体,但是以MIME类型字体/ otf传输
<
我已经尝试了以下MIME类型:
Searching the web, I find heaps of different suggestions for what the proper MIME type for a font is, but I have yet to try any MIME type that rids me of a Chrome warning such as the following:
Resource interpreted as font but transferred with MIME type font/otf
The font is an OTF.
I've tried the following MIME types so far
- font/otf
- application/font-otf
- application/font
- application/otf
- application/octet-stream
- application/x-font-otf
- application/x-font-TrueType (I know it's not truetype, but one source quoted this for OTF)
解决方案
Try using "font/opentype".
这篇关于正确的MIME类型的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文