Safari字体重量问题,文本太粗 [英] Safari font-weight issue , text too bold

查看:314
本文介绍了Safari字体重量问题,文本太粗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我应用 font-weight:bold 样式时,与其他浏览器相比,Safari中的字体外观过粗。我尝试下面css的建议在一些网站,但它仍然是一样的。

When I apply a font-weight:bold style, the look of the font is too bold in Safari when compared to other browsers. I tried below css as suggested in some site but its still the same.

text-shadow: #000000 0 0 0px;

文字呈现的屏幕截图:

strong> Chrome

Chrome

Safari

Safari

这是我的css声明:

p {

margin: 8px 5px 0 15px; 
color:#D8D2CE; 
font-size:11pt;  
letter-spacing:-1px; 
font-weight: bold;  
font-family: LektonRegular;  
}

@font-face {
font-family: 'LektonRegular';
src: url('myfonts/lekton-regular-webfont.eot');
src: url('myfonts/lekton-regular-webfont.eot?#iefix') format('embedded-opentype'),
     url('myfonts/lekton-regular-webfont.woff') format('woff'),
     url(myfonts/lekton-regular-webfont.ttf)  format('truetype'),
     url('myfonts/lekton-regular-webfont.svg#LektonRegular') format('svg');
font-weight: normal;
font-style: normal;

}

如何解决?

推荐答案

为了在浏览器中一致地呈现粗体文本,您的字体应该明确包含粗体字符。否则,浏览器可能会尝试根据其正常变体制作大写的字符变体,并且结果在不同浏览器中不一致,因为它们可能有不同的算法来进行此类转换。

For rendering bold text consistently across browsers, your font should explicitly contain bold characters. Otherwise, browsers probably try to make bold variants of characters based on their normal variants, and results are inconsistent across browsers since they likely have different algorithms for such conversion.

文本呈现在系统级(例如Windows,Mac OS)上的不同平台上可以是不同的。这种差异很好,通常不需要修正。

Also note that text rendering may be different on different platforms on system level (e.g. Windows, Mac OS). Such differences are OK and do not typically need to be fixed.

另请参见有关-webkit-font-smoothing属性的主题

这篇关于Safari字体重量问题,文本太粗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆