2

我的字体在 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/

提前致谢,J

4

5 回答 5

3

看起来您的 .eot 文件对于 IE 已损坏,我看不出 FF 不应该工作的合乎逻辑的原因。尝试改用这个字体创建器。

于 2013-01-07T00:37:08.713 回答
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
于 2013-01-07T05:09:55.787 回答
0

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

于 2013-01-07T05:17:20.073 回答
0

字体文件可能已损坏,并且可能已损坏。这在使用非法字体副本时并不少见。在使用 Snell Roundhand 和 Zapfino 等字体的问题上,请联系Linotype、版权所有者或其经销商。

于 2013-01-07T08:32:13.237 回答
0

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

www.fontsquirrel.com 上的页面说:

字体“snell_roundhand_script.ttf”已损坏,无法转换。

于 2013-01-07T01:18:40.813 回答