开发者

Font anti-aliasing for labels in Xcode 4

I am editing a xib file in Xcode4 Interface Builder, butt开发者_Python百科ons look OK, but labels are missing anti-aliasing.

When I create a new file and add labels, they do look fine. Any ideas?

Here is a screenshot (can't post images yet, sorry) http://i.imgur.com/DzFGy.png


What you're seeing isn't a lack of antialiasing, it's a lack of subpixel antialiasing. Note the difference:

Font anti-aliasing for labels in Xcode 4

Font anti-aliasing for labels in Xcode 4

The colored edges line up with the "subpixels" on your LCD, so that a solid block of pixels is illuminated and it still looks like the right color.

The problem here is that Core Animation doesn't do subpixel antialiasing as automatically as it does when you don't use CA. The simple solution is to disable the CA Layer backing on your view (or whatever superview has it). Otherwise, this question has some more useful explanation and info about workarounds.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜