字体在 Firefox 上不起作用。对其他人也有很好的效果

Miq*_*ell 5 css firefox webfonts

我有一个项目,使用 font-face 已经有一段时间没有问题了。今天我检查了一下,字体在 Firefox v14 和 v15 上不起作用,也可能在 v12+ 上不起作用,就像这个线程中的情况一样:http://css-tricks.com/forums/discussion/17337/font-face-problem- with-firefox-v-12/p1 我的问题与上一个线程完全相同。

总结一下。我正在使用字体来加载网络字体,如下所示:

@font-face {
    font-family: 'TradeGothicLTStdCnBold';
    src: url('/jovenestalentos/fonts/tradegothicltstd-bdcn20-webfont.eot');
    src: url('/jovenestalentos/fonts/tradegothicltstd-bdcn20-webfont.eot?#iefix') format('embedded-opentype'),
         url('/jovenestalentos/fonts/tradegothicltstd-bdcn20-webfont.woff') format('woff'),
         url('/jovenestalentos/fonts/tradegothicltstd-bdcn20-webfont.ttf') format('truetype'),
         url('/jovenestalentos/fonts/tradegothicltstd-bdcn20-webfont.svg#TradeGothicLTStdCnBold') format('svg');
    font-weight: normal;
    font-style: normal;
Run Code Online (Sandbox Code Playgroud)

进而

#bea .bea {
    font-family: 'TradeGothicLTStdCnBold';
    font-size: 14px;
}
Run Code Online (Sandbox Code Playgroud)

根据 firebug,字体已正确加载。它适用于 safari、chrome、IE 和一些 firefox。我已经尝试了 6 个 Firefox (v13-15),它在其中一些上工作,但在其他上不起作用。我无法确定任何原因。

我还寻找了 firefox 配置值 gfx.font_rendering.cleartype.always_use_for_content; 我注意到在我测试的所有火狐浏览器中都设置为 false,即使是那些工作正常的火狐浏览器。

实例: http: //comoquierascolacao.com/jovenestalentos/

它应该是什么样子: http: //postimage.org/image/n2r9fxdsv/它应该是什么样子

总结一下: - 路线有效。- 路由在同一个域中,没有跨域问题。- 它确实在某些火狐浏览器中有效,但在其他火狐浏览器中无效(我无法弄清楚原因)。- 它以前在我自己的 Firefox 中工作过,也许是在 v12 之前。

谢谢大家,任何帮助将不胜感激,因为这让我发疯。

Miq*_*ell 3

好吧,是我的错。毕竟这是一个跨域问题。www.domain...即使在访问Reddirecting 每个人到 www.domain 时加载的字体也http://domain... 应该可以解决问题,我认为从现在开始这将是一个很好的做法。另一种解决方案是使用相对路径加载字体。