当我应用font-weight:粗体风格时,与其他浏览器相比,Safari中的字体外观过于粗糙.我尝试下面的css建议在一些网站,但它仍然是一样的.
- text-shadow: #000000 0 0 0px;
文字渲染截图:
铬
苹果浏览器
这是我的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;
- }
如何解决?
解决方法
为了在浏览器之间一致地呈现粗体文本,您的字体应显式包含粗体字符.否则,浏览器可能会尝试根据其常规变体形成大胆的字符变体,并且结果在浏览器之间不一致,因为它们可能具有不同的算法用于此类转换.
另请注意,系统级别的不同平台(例如Windows,Mac OS)上的文本呈现可能不同.这种差异是可以的,通常不需要修复.