CSS Font Face无法在Firefox或IE8中运行

时间:2013-01-07 00:32:52

标签: css firefox internet-explorer-8 font-face

我的Font-Face在Firefox或IE8中不起作用:(

文件是正确的运动,这是我的css代码:

@font-face {
                font-family: 'SnellRoundhand-Script';
                src: url('snellroundhandscript.eot');
                src: url('snellroundhandscript.eot?#iefix') format('embedded-opentype'),
                         url('snellroundhandscript.woff') format('woff'),
                         url('snellroundhandscript.ttf') format('truetype'),
                         url('snellroundhandscript.svg#snellroundhandscript') format('svg');
                font-weight: normal;
                font-style: normal;
        }

文件可能会被破坏吗?或者我的CSS有问题吗?

我的代码下面还有以下代码:

@font-face {
                font-family: 'Zapfino';
                src: url('Zapfino.eot');
                src: url('Zapfino.eot?#iefix') format('embedded-opentype'),
                         url('Zapfino.woff') format('woff'),
                         url('Zapfino.ttf') format('truetype'),
                         url('Zapfino.svg#Zapfino') format('svg');


                font-weight: normal;
                font-style: normal;
        }

您可以在此处查看我的问题.... http://hearingaidneeds.com/

先谢谢了, Ĵ

4 个答案:

答案 0 :(得分:3)

看起来您的.eot文件已损坏IE,我看不出FF不应该工作的逻辑原因。请尝试使用this font face creator

答案 1 :(得分:2)

Firefox不起作用的原因是您的WOFF文件不是有效的WOFF文件。值得一看的是Web控制台,它会告诉你这些事情。我说,在你的网站上:

[00:07:47.442] downloadable font: table 'cmap': failed to parse table (font-family: "SnellRoundhand-Script" style:normal weight:normal stretch:normal src index:1)
source: http://hearingaidneeds.com/wp-content/themes/twentyeleven/snellroundhandscript.woff @ http://hearingaidneeds.com/wp-content/themes/twentyeleven/style.css
[00:07:47.442] downloadable font: rejected by sanitizer (font-family: "SnellRoundhand-Script" style:normal weight:normal stretch:normal src index:1)
source: http://hearingaidneeds.com/wp-content/themes/twentyeleven/snellroundhandscript.woff @ http://hearingaidneeds.com/wp-content/themes/twentyeleven/style.css
[00:07:47.613] downloadable font: table 'cmap': failed to parse table (font-family: "SnellRoundhand-Script" style:normal weight:normal stretch:normal src index:2)
source: http://hearingaidneeds.com/wp-content/themes/twentyeleven/snellroundhandscript.ttf @ http://hearingaidneeds.com/wp-content/themes/twentyeleven/style.css
[00:07:47.613] downloadable font: rejected by sanitizer (font-family: "SnellRoundhand-Script" style:normal weight:normal stretch:normal src index:2)
source: http://hearingaidneeds.com/wp-content/themes/twentyeleven/snellroundhandscript.ttf @ http://hearingaidneeds.com/wp-content/themes/twentyeleven/style.css
[00:07:47.613] downloadable font: no supported format found (font-family: "SnellRoundhand-Script" style:normal weight:normal stretch:normal src index:4)
source: (end of source list) @ http://hearingaidneeds.com/wp-content/themes/twentyeleven/style.css

答案 2 :(得分:0)

我尝试将其上传到font-squirrel时出现此错误。就像djthoms说的那样,你的文件已经损坏了。

  

www.fontsquirrel.com上的页面说:

     

字体' snell_roundhand_script.ttf'是腐败的,无法转换。

答案 3 :(得分:0)

尝试使用Font2Web,这将转换您的字体,同时创建css文件和演示HTML文件,向您展示如何在您的网站上使用网页字体 - 使用CSS @ font-face