什么mime类型应该作为WOFF字体?
我服务truetype(ttf)字体as font/truetype和opentype(otf)as font/opentype,但我找不到WOFF字体的正确格式.
我曾尝试font/woff,font/webopen和font/webopentype,但Chrome仍然会抱怨:
"资源被解释为字体,但使用MIME类型application/octet-stream进行传输."
有人知道吗?
在网上搜索,我找到了大量关于字体的正确MIME类型的不同建议,但我还没有尝试任何可以解决Chrome警告的MIME类型,如下所示:
资源解释为字体但使用MIME类型font/otf传输
字体是OTF.
到目前为止,我已尝试过以下MIME类型
我在Google上收到了一条警告:
资源解释为Font但使用MIME类型application/octet-stream传输:".../Content/Fonts/iconFont.ttf".
即使我有这个警告它也有效,但我更喜欢避免这个警告.
这里是我的报关表:
@font-face {
font-family: 'iconFont';
src: url('../Fonts/iconFont.eot?#iefix') format('embedded-opentype'),
url('../Fonts/iconFont.svg#iconFont') format('image/svg+xml'),
url('../Fonts/iconFont.woff') format('font/x-woff'),
url('../Fonts/iconFont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
我已经搜索了其他帖子但到目前为止没有运气.
请注意,我的服务器是Microsoft的IIS.
任何想法我怎么能避免这个警告?
谢谢.
链接到相关网站:http://qbtei.com/nationalretail/public
在我的fonts.css中,我正在加载一堆字体,如下所示:
@font-face {
font-family: GothamBook;
src: url('../fonts/Gotham-Book.otf');
src: url( ../fonts/Gotham-Book.otf ); /* IE */
}
@font-face {
font-family: GothamBookItalic;
src: url('../fonts/gothambookitalic.otf');
src: url( ../fonts/gothambookitalic.otf ); /* IE */
}
@font-face {
font-family: GothamBold;
src: url('../fonts/gothambold.otf');
src: url( ../fonts/gothambold.otf ); /* IE */
}
Run Code Online (Sandbox Code Playgroud)
在Firefox/chrome这些字体没有问题,但在IE 10中,当我检查元素时,这个css文件显示为空并且字体未加载
我曾尝试使用http://www.fontsquirrel.com/tools/webfont-generator创建一个看起来像这样的新字体css表,但最终无法在firefox,chrome或Internet Explorer中使用
@font-face {
font-family: 'gotham_boldregular';
src: url('gothambold-webfont.eot');
src: url('gothambold-webfont.eot?#iefix') format('embedded-opentype'),
url('gothambold-webfont.woff') format('woff'),
url('gothambold-webfont.ttf') format('truetype'),
url('gothambold-webfont.svg#gotham_boldregular') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
我在css中使用我的字体,如下所示:
.nav-text{
font-family: GothamLight;
font-size: 21px;
color: …Run Code Online (Sandbox Code Playgroud) 有没有人在Chrome 10/Win中遇到过类似的东西?

这两个webfonts中的所有非中断空格都未正确呈现.在IE7/8/9,Firefox,Safari和Chrome/OSX中工作.
我的fonts.css文件的内容:
@font-face {
font-family: 'Hellenic';
src: url('../fonts/eot/hellenic.eot?') format('eot'),
url('../fonts/ttf/hellenic.ttf') format('truetype'),
url('../fonts/woff/hellenic.woff') format('woff'),
url('../fonts/svg/hellenic.svg#MCMHellenicWide') format('svg');
}
@font-face {
font-family: 'Lasalle';
src: url('../fonts/eot/lasalle.eot?') format('eot'),
url('../fonts/ttf/lasalle.ttf') format('truetype'),
url('../fonts/woff/lasalle.woff') format('woff'),
url('../fonts/svg/lasalle.svg#FilmotypeLaSalle') format('svg');
}
@font-face {
font-family: 'LeagueGothic';
src: url('../fonts/eot/leaguegothic.eot?') format('eot'),
url('../fonts/ttf/leaguegothic.ttf') format('truetype'),
url('../fonts/woff/leaguegothic.woff') format('woff'),
url('../fonts/svg/leaguegothic.svg#svgFontName') format('svg');
}
Run Code Online (Sandbox Code Playgroud) 我在我的网站上使用了一些服装字体,但我遇到了一个没有加载的问题,我无法弄清楚问题,这里是代码:
@font-face {
font-family: OuachitaWayWbw;
src: url('fonts/Ouachita Way Wbw.ttf') format("truetype") ;
font-family: 'ChromeYellowNF';
src: url('fonts/Chrome Yellow NF.ttf');
}
#name {
font-size:26px;
font-family: 'OuachitaWayWbw';
padding-top:30px;
color:#000000;
margin-bottom:20px;
}
Run Code Online (Sandbox Code Playgroud)
该ChromeYellowNF工作的.我也试图把每一个都放在不同的Font-face但没有奏效.