【问题标题】:CSS Font Face not working in Firefox or IE8CSS Font Face 在 Firefox 或 IE8 中不起作用
【发布时间】:2013-01-07 00:32:51
【问题描述】:

我的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/

【问题讨论】:

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


    【解决方案1】:

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

    【讨论】:

      【解决方案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
      

      【讨论】:

        【解决方案3】:

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

        www.fontsquirrel.com 上的页面显示:

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

        【讨论】:

        • 另外,请确保您回到旧问题并接受“答案”。
        【解决方案4】:

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

        【讨论】:

          【解决方案5】:

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

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2012-11-07
            • 2013-01-04
            • 2012-08-19
            • 2012-03-20
            • 1970-01-01
            • 2011-07-08
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多