正确的MIME类型的字体 [英] Proper MIME type for fonts

查看:243
本文介绍了正确的MIME类型的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

搜索网页时,我发现对于某种字体的正确MIME类型有不同的建议,但是我还没有尝试任何MIME类型,这种类型可以消除Chrome警告,如下所示:


资源解释为字体,但是以MIME类型字体/ otf传输



<



我已经尝试了以下MIME类型:


  • font / otf

  • 应用程序/ font-otf

  • 应用程序/字体 / otf

  • application / octet-stream

  • application / x-font-otf

  • application / x -font-TrueType(我知道它不是truetype,但有一个源文件引用了这个OTF)
  • 尝试使用font / opentype。


    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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆