WOFF字体的Mime类型? [英] Mime type for WOFF fonts?

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

问题描述

WOFF字体应该用作哪种哑剧类型?

What mime type should WOFF fonts be served as?

我将Truetype(ttf)字体用作font/truetype,将opentype(otf)用作font/opentype,但是我找不到WOFF字体的正确格式.

I am serving truetype (ttf) fonts as font/truetype and opentype (otf) as font/opentype, but I cannot find the correct format for WOFF fonts.

我尝试过font/wofffont/webopenfont/webopentype,但是Chrome仍然抱怨:

I have tried font/woff, font/webopen, and font/webopentype, but Chrome still complains:

资源被解释为字体,但以MIME类型application/octet-stream传输."

"Resource interpreted as font but transferred with MIME type application/octet-stream."

有人知道吗?

推荐答案

基思·肖的评论 2017年6月22日:

Update from Keith Shaw's comment on Jun 22, 2017:

自2017年2月起, RFC8081 是建议的标准.它定义了字体的顶级媒体类型,因此WOFF和WOFF2的标准媒体类型如下:

As of February 2017, RFC8081 is the proposed standard. It defines a top-level media type for fonts, therefore the standard media type for WOFF and WOFF2 are as follows:

font/woff

font/woff2


2011年1月已宣布同时Chromium会识别


In January 2011 it was announced that in the meantime Chromium will recognize

application/x-font-woff

作为WOFF的哑剧类型.我知道此更改已在Chrome beta版中出现,并且如果还不稳定,应该不会离得太远.

as the mime-type for WOFF. I know this change is now in Chrome beta and if not in stable yet, it shouldn't be too far away.

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

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