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

html – 为什么我的字体在IE9中看起来好多了?

我使用font-family:Myriad;一些文字的font-size:40px.我不敢相信IE以最好的质量显示字体!比Opera,Firefox和Chrome好多了.

怎么会这样?在IE中如何使文本看起来与其他浏览器一样好?

这是一个演示:

http://jsfiddle.net/55Ruh/3/

在所有浏览器中尝试此链接. IE(最新版本,9)显示最好和最优质的文字,不是吗?

解决方法

简单地说:这是因为IE9引入了基本上基于 WPF’s ClearType implementationa new font rendering engine.其增强引擎在减少锯齿状边缘方面做得更好,使字体看起来更加平滑和更好,特别是在大尺寸.

进入细节 – 我的意思是获得真正的技术性 – ClearType的这种品种与Windows的其余部分(也称为GDI ClearType(Windows的GDI图形库))不同.旧的GDI ClearType是大多数其他浏览器的Windows版本基于他们的字体渲染引擎,这也是使字体看起来真的像大尺寸的吉他.

第二个链接的下一个段落总结了大部分其余的内容,这非常好地解释了为什么在IE9的新引擎中字体看起来更加流畅:

A significant improvement over the prevIoUs version of ClearType is the use of sub-pixel positioning. Unlike the ClearType implementation found in GDI,the ClearType found in Windows Presentation Foundation (WPF) allows glyphs to start within the pixel and not just the beginning boundary of the pixel. Because of this extra resolution in positioning glyphs,the spacing and proportions of the glyphs is more precise and consistent.

特别参见Y-direction anti-aliasing的截图,以供比较.另一个报价:

ClearType in Windows Presentation Foundation (WPF) provides antialiasing on the y-direction level to smooth out any jagged edges.

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

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

相关推荐