微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在CSS中使用@ font-face的Windows字体渲染问题

我在 Windows计算机上遇到了@ font-face的问题(没有什么浏览器).它在linux和osx中运行正常.

这是我正在使用的css代码(使用font-squirel生成)

检查问题的屏幕截图..似乎有2个问题

>在Windows上,字体是“跳舞”.未在基线上对齐.
>在Windows上,字体看起来没有消除锯齿.

有人有想法吗?提前致谢.

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;
}

解决方法

我们的一些字体遇到了类似的问题,我很确定是什么修复了将“Truetype Hinting”设置为“Keep existing”的问题.

原文地址:https://www.jb51.cc/css/215019.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。