Jer*_*its 7 css windows typography font-face
我在Windows计算机上遇到了@ font-face的问题(没有什么浏览器).它在linux和osx中运行正常.
这是我正在使用的css代码(使用font-squirel生成)
检查问题的屏幕截图..似乎有2个问题
有人有想法吗?提前致谢.
OSX和Linux中的屏幕截图:
http://j3rn.org/images/ob_font1.png
Windows中的屏幕截图:
http://j3rn.org/images/ob_font2.png
CSS代码
@font-face {
font-family: 'SchulbuchNordFett';
src: url(assets/fonts/schulbuchnord-fett-webfont.eot');
src: url('assets/fonts/schulbuchnord-fett-webfont.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/schulbuchnord-fett-webfont.woff') format('woff'),
url('assets/fonts/schulbuchnord-fett-webfont.ttf') format('truetype'),
url('assets/fonts/schulbuchnord-fett-webfont.svg#SchulbuchNordFett') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'SchulbuchNordNormal';
src: url('assets/fonts/schulbuchnord-normal-webfont.eot');
src: url('assets/fonts/schulbuchnord-normal-webfont.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/schulbuchnord-normal-webfont.woff') format('woff'),
url('assets/fonts/schulbuchnord-normal-webfont.ttf') format('truetype'),
url('assets/fonts/schulbuchnord-normal-webfont.svg#SchulbuchNordNormal') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
几周前我遇到了同样的问题。我们将矢量图形存储在字体文件中,以避免实现单独的图像或 CSS 精灵。一个简单的解决方法是使用例如字体 squirrel
http://www.fontsquirrel.com/tools/webfont-generator
没有(!)优化选项,该选项会处理您的字体以针对网络进行优化,并且有时会由于压缩尝试而破坏它(如果它们不满足某些标准)。一个可能的缺点可能是您的文件会变得更大一些。您还可以尝试这个网络服务:
http://fontface.codeandmore.com/indexnew.php
希望这可以帮助!