Mac/Safari 上的字体重量变轻 [英] Font weight turns lighter on Mac/Safari
问题描述
在我的上一个网站上,文本在 chrome 和 firefox 上自然完美,没有触及字体平滑或其他任何东西.
但是在 Mac/Safari 7 上,文本显示得很好,然后立即变薄(太薄/不好看).
On my last website, the text is perfect naturally on chrome and firefox without touching font-smoothing or anything else.
But on Mac / Safari 7 the text appears well then turns immediately thinner (too much thinner / not nice to read).
经过一些研究 [cf http://www.usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/]
和一些测试玩
After doing some research [cf http://www.usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/]
and some tests playing with
-webkit-font-smoothing
看起来 Safari 首先显示文本:
It looks like Safari display the text first with :
-webkit-font-smoothing: subpixel-antialiased;
然后就在你得到闪烁效果之后,当它把字体变成:
Then just after you got the flickering effect, when it is turning font to :
-webkit-font-smoothing: antialiased;
所以在我看来我别无选择,只能强迫
So it seems to me that I had no choice but to force
-webkit-font-smoothing: subpixel-antialiased;
使我的网站在所有浏览器上保持一致.
我使用的是字体 Avenir Std Roman.
to make my website consistent on all browsers.
I am using font-face Avenir Std Roman.
对 Safari 问题的一些解释?任何更好的解决方案?我的字体可能是问题的一部分吗?
Some explanations to that Safari problem ? Any better solutions ? Could my font be part of the problem ?
谢谢.
推荐答案
所以我解决了我的申请问题:
So I fixed my problem with applying:
body {
-webkit-font-smoothing: subpixel-antialiased;
}
现在我的字体在每个浏览器上都是一致的.
Now my font is consistent on every browsers.
这篇关于Mac/Safari 上的字体重量变轻的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!