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

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

问题描述

在网上搜索时,我发现了很多关于字体的正确MIME类型的不同建议,但是我还没有尝试过使我摆脱Chrome警告的任何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:

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

Resource interpreted as font but transferred with MIME type font/otf

字体是OTF.

到目前为止,我已经尝试了以下MIME类型

I've tried the following MIME types so far

  • font/otf
  • application/font-otf
  • 应用程序/字体
  • application/otf
  • 应用程序/八位字节流
  • application/x-font-otf
  • application/x-font-TrueType(我知道它不是truetype,但有消息称这是OTF)

推荐答案

尝试使用字体/opentype".

Try using "font/opentype".

这篇关于OTF字体的正确MIME类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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