@ font-face无法在IE,Firefox中运行

时间:2012-06-27 15:54:05

标签: fonts font-face windows-server

我在.NET应用程序中使用Font Squirrel生成的@ font-face。字体在本地渲染很棒。但是在发布应用程序时,它只适用于服务器上的Chrome,而不适用于IE / Firefox。我正在使用所有最新版本。

我已经尝试过搞乱了.htaccess文件&在服务器的Mime类型中添加.ot​​f但仍然存在问题。

任何帮助都会很棒。

4 个答案:

答案 0 :(得分:0)

这是我用于Font-Face的格式,如果这有帮助:

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

答案 1 :(得分:0)

这是我的代码:

@font-face {
font-family: 'AsapRegular';
src: url('fonts/Asap-Regular-webfont.eot');
src: url('fonts/Asap-Regular-webfont.eot?#iefix') format('embedded-opentype'),
     url('fonts/Asap-Regular-webfont.woff') format('woff'),
     url('fonts/Asap-Regular-webfont.ttf') format('truetype'),
     url('fonts/Asap-Regular-webfont.svg#AsapItalic') format('svg');
font-weight: normal;
font-style: normal;

}

答案 2 :(得分:0)

我想出了这个问题。当我通过Visual Studio发布应用程序时,它没有通过字体生成器创建的12/16字体文件。所以我将这些文件放在Windows服务器上。

现在一切都像雨一样。

答案 3 :(得分:0)

我发现在通过Visual Studio发布.NET应用程序时,没有将12/16的字体文件移动到服务器上。我手动添加它们之后一切正常。

相关问题