为什么字体有时在Mac OS X上看起来像“胖”?

廷伯曼

有时,从挂起状态恢复时,Mac OS X中的字体看起来比正常字体“杂乱无章”。不幸的是,现在我无法让我的Macbook Pro表现出“正常”的行为进行比较,昨天和今天一直是异常的。如果我可以得到我认为是“正常”的屏幕截图,请添加它们。

“修复”这是随机的。我使用外接显示器,有时将其拔出并重新插入,甚至将其关闭然后再打开都可以。有时在连接显示器(或不连接显示器)的情况下,检测显示器是可行的。有时需要注销或完全重新引导。

使用的显示:

  • Macbook Pro 15英寸内置显示屏
  • 戴尔27英寸液晶屏(2009年型号)

我看到这种情况的软件,至少最值得注意的是:

  • Firefox(以下屏幕截图)
  • iTerm
  • 事物
  • MacIrssi(以下屏幕截图)

我正在使用Mac OS X 10.5.8。

MacIrssi的“异常”观点与Inconsolata 16 pt。

异常(Macirssi)

Firefox中的“异常”视图。

异常(Firefox)

终于让它切换回了,尽管从挂起恢复为“胖”之后:-(。

正常(Macirssi)

和“正常”在Firefox中:

正常(Firefox)

布莱恩·坎贝尔

当您放大图像时,问题变得明显:

放大“胖”字体的屏幕截图,显示彩色像素
放大了“瘦”字体的屏幕截图,显示了灰度像素

如您所见,瘦版本完全是灰度的,而胖版本的像素有些偏红,有些像素有些偏蓝。

This occurs because of sub-pixel anti-aliasing. An LCD screen doesn't actually contain square pixels that can be any color; instead, it has three skinny rectangular elements that are red, green, and blue. (Images below from Wikipedia).

Pixel Patterns on various displays

When anti-aliasing fonts, instead of simply using shades of grey, you can vary the intensity of each of the three colors, to allow you to render at three times the horizontal resolution you can achieve simply by anti-aliasing with shades of grey. The scaled-up pictures I provided don't actually represent what you are seeing; instead, the fonts should look considerably smoother due to the shape and placement of the pixels. It would be more accurate to render it something like this:

Example of Sub-Pixel anti-aliased text

So, what you are seeing is that sometimes the font is being rendered with sub-pixel anti-aliasing, and sometimes it is being rendered with normal anti-aliasing. I would guess that the sub-pixel anti-aliasing algorithms being used are optimized for black text on a white background, which may explain why the text looks a little "fat" when viewed as white text on a black background.

On the other hand, it may simply be a more accurate rendering of the actual font. If you look at a properly scaled up version of the same font, it looks a bit bolder and less wispy than the "skinny" version shown above:

Example text at higher font size

The reason it's switching back and forth between the two versions is probably because of your second monitor. I don't know exactly when the OS decides this, or how it does, but it likely detects an LCD with an unknown subpixel layout. Because it doesn't know the layout of the pixels, it goes with the safer standard anti-aliasing (as sub-pixel anti-aliasing can look really strange when displayed on an LCD with the wrong layout). It seems that somehow, you are sometimes getting it to make one decision, and sometimes getting it to make the other. I believe that once an application is started in a certain rendering mode, it won't change until you quit and re-launch the application, which would explain why you're seeing erratic behavior; what behavior you get may depend on exactly when you connect your external monitor along with when you launch your applications.

如果您只是想在所有应用程序中保持一致,则无论是否使用第二个LCD并始终使用窄字体,都可以在“外观系统”首选项面板中关闭字体平滑功能:

Highlighting "Use LCD Font Smoothing When Available" in Appearance system preference panel

当然,您到处都会失去亚像素抗锯齿功能。正如John Rudy所指出的,通过遵循使用defaults程序手动设置级别的说明,您可以得到更精细的控制或者,如果您还没有使用Snow Leopard,则应该在“系统偏好设置”中使用更细粒度的控件。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章