相关疑难解决方法(0)

WOFF字体的Mime类型?

什么mime类型应该作为WOFF字体?

我服务truetype(ttf)字体as font/truetype和opentype(otf)as font/opentype,但我找不到WOFF字体的正确格式.

我曾尝试font/woff,font/webopenfont/webopentype,但Chrome仍然会抱怨:

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

有人知道吗?

embedded-fonts woff

548
推荐指数
9
解决办法
32万
查看次数

适合字体的MIME类型

在网上搜索,我找到了大量关于字体的正确MIME类型的不同建议,但我还没有尝试任何可以解决Chrome警告的MIME类型,如下所示:

资源解释为字体但使用MIME类型font/otf传输

字体是OTF.

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

  • 字体/ OTF
  • 应用/字体OTF
  • 应用/字体
  • 应用程序/ OTF
  • 应用/八位字节流
  • 应用程序/ x-字体OTF
  • application/x-font-TrueType(我知道它不是truetype,但有一个来源引用了这个OTF)

fonts mime

241
推荐指数
9
解决办法
20万
查看次数

Google警告:资源被解释为字体,但使用MIME类型application/octet-stream进行传输

我在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.

任何想法我怎么能避免这个警告?

谢谢.

css font-face

68
推荐指数
5
解决办法
6万
查看次数

IE 10没有加载字体

链接到相关网站: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)

css fonts internet-explorer font-face

5
推荐指数
1
解决办法
2万
查看次数

Chrome 10/Windows @ font-face编码有问题

有没有人在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)

css windows google-chrome character-encoding font-face

4
推荐指数
1
解决办法
4647
查看次数

Font-Face未加载

我在我的网站上使用了一些服装字体,但我遇到了一个没有加载的问题,我无法弄清楚问题,这里是代码:

@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但没有奏效.

html css html5 css3 font-face

1
推荐指数
1
解决办法
1万
查看次数