@ font-face在Firefox中不合作 [英] @font-face not cooperating in Firefox

查看:100
本文介绍了@ font-face在Firefox中不合作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过许多事情,包括点击所有与我的问题相关的问题(有吨!)并尝试了所有的解决方案,但没有为我工作。我尝试在有条件的IE语句包装.eot文件,但也没有工作。有人说,@ font-face将无法在Firefox中工作,如果你不托管在自己的服务器上的文件...或类似的东西。无论如何,请此处查看所有其他浏览器与Firefox之间的比较。请不要bash!我真的尝试了每一个解决方案谷歌和stackoverflow提供。 (请注意,这是Tumblr主题,所有文件/图片必须通过 Tumblr的上传者。)

I have tried numerous things, including clicking on ALL of the questions related to my question (there were tons!) and tried all of their "solutions" but none worked for me. I tried wrapping the .eot file in a conditional IE statement but that didn't work either. Somebody said that @font-face won't work in Firefox if your not hosting the file on your own server... Or something like that. Anyway, go here to see the comparison between all other browsers vs Firefox. Please don't bash! I really did try every solution Google and stackoverflow had to offer. (Keep in mind that this is a Tumblr theme, and all files/images must be hosted via Tumblr's uploader .)

提前感谢!

另外,这里是我一直在使用的代码: p>

Also, here is the code I have been using:

<!--[if IE]>
<style>
@font-face {
font-family: 'S';
src: url('http://static.tumblr.com/ctwb3zj/5bTlflus9/zegoelight-u-webfont.eot');
}
</style>
<![endif]-->

<style>
@font-face {
font-family: 'S';
src: url('http://static.tumblr.com/ctwb3zj/5bTlflus9/zegoelight-u-webfont.eot');
src: local('S'), 
     local('S'), 
     url('http://static.tumblr.com/ctwb3zj/n4Zlfluv6/zegoelight-u-webfont.ttf')      
format('truetype'),
     url('http://static.tumblr.com/ctwb3zj/ovQlfluz3/zegoelight-u-webfont.svg#font')    
format('svg'); 
     url('http://static.tumblr.com/ctwb3zj/1AJlfluwz/zegoelight-u-webfont.woff')
format('woff');
}
</style>

我试图在Firefox中配置,并将security.fileuri.strict_origin_policy切换为false,但是它没有不工作。另外,我需要一个方法,所以所有用户谁查看我的主题或使用它,以便能够查看字体,并且默认设置为true。

I tried going to about:config in Firefox and toggling security.fileuri.strict_origin_policy to false but it didn't work. Plus I need a way so all users who view my theme or use it to be able to view the font as well, and that is set to true by default.

推荐答案

编辑:

这里是解决方案:
跨网域解决方法

Firefox不喜欢跨网域嵌入。

Firefox does not like cross domain embedding.

这篇关于@ font-face在Firefox中不合作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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