@ font-face在Firefox或IE中不工作 - 我怎么知道为什么? [英] @font-face not working in Firefox or IE - how can i figure out why?

查看:202
本文介绍了@ font-face在Firefox或IE中不工作 - 我怎么知道为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要走了。 @ font-face在我的客户端服务器上测试时不会在IE或FireFox中工作。我的代码是合法的 - 它的工作原理很好,如果我上传到我自己的服务器,跨所有浏览器。但没有运气,我真正需要它工作。我已尝试重新排序CSS,并确认字体确实已上传到服务器。

I am going nuts. @font-face won't work in IE or FireFox when I test on my client's server. My code is legit - it works just fine if I upload it to my own server, across all browsers. But no luck where I truly need it to work. I've tried re-ordering the CSS, and confirmed the fonts are indeed uploaded to the server.

我已阅读以下链接中的信息:

http://sixrevisions.com/css/font-face- web-fonts-issues / $ b $bÁ
http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

I have read the info on the following links:
http://sixrevisions.com/css/font-face-web-fonts-issues/
http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

根据第一篇文章中的信息,我试过谷歌的WebFont加载程序,万一这将解决问题,但没有运气。我也看了一下在Firebug的.NET面板,但对我来说是希腊。我尝试更新URL路径,删除基于此帖子的域:
http://www.fontsquirrel.com/forum/discussion/227/font-face-not-working-in-firefox-or-ie/p1

Based on info in the first article, I tried Google's WebFont loader in case that would fix things, but no luck. I also looked at the .NET panel in Firebug but it is greek to me. I tried updating the URL paths, removing the domain based on this post: http://www.fontsquirrel.com/forum/discussion/227/font-face-not-working-in-firefox-or-ie/p1

我不知道还有什么要尝试。在这一点上,我放弃了,告诉客户,他们不能有他们的花哨的字体,但我真的想了解为什么。任何帮助在那里?

I don't know what else to try. At this point, I have given up and told the client they can't have their fancy font but I really want to understand WHY. Any help out there?

这是我使用由FontSquirrel生成的代码:

Here's the code I'm using generated by FontSquirrel:

        @font-face {
        font-family: 'Dax';
        src: url('/fonts/dax/dax-regular-webfont-webfont.eot');
        src: url('/fonts/dax/dax-regular-webfont-webfont.eot?#iefix') format('embedded-opentype'),
             url('/fonts/dax/dax-regular-webfont-webfont.woff') format('woff'),
             url('/fonts/dax/dax-regular-webfont-webfont.ttf') format('truetype'),
             url('/fonts/dax/dax-regular-webfont-webfont.svg#Dax') format('svg');
        font-weight: normal;
        font-style: normal;
    }
        body{
                    font-family: 'Dax';
                    font-size: 25px;
                                }

另一个想法刚刚发生在我 - 我的客户端有一个重定向设置现场。这是为什么它不工作在这些浏览器?

Another thought just occurred to me - my client has a redirect set up on their site. Could that be why it isn't working in those browsers?

感谢您的回复。

推荐答案

字体从同一个域...提供服务,所以它听起来像一个跨域问题。如果没有,和任何一种方式你需要这个ie(我假设),你需要添加woff文件类型到.htaccess文件。更多此处: http://www.fontsquirrel.com/blog/ 2010/11 / troubleshooting-font-face-problems

firefox requires all fonts be served from the same domain....so it sounds like a cross domain problem. if not, and either way you'll need this for ie (i'm assuming), you need to add woff file type to your .htaccess file. more here: http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems

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

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