问题
I'm trying to create a view that is backed by a Core Animation layer. However, when I enable the layer, my labels start to look slightly jagged. I've attached a demonstration of difference:
I know it is subtle, but it is driving me crazy (especially for smaller fonts). Any way I can get the Core Animation layer labels to be anti-aliased?
回答1:
Nitpick: the Core Animation layer is anti-aliased, but at a lower quality – it doesn’t use sub-pixel anti-aliasing. The reason for this is that sub-pixel anti-aliasing requires per-channel blending, which can’t be done cheaply with hardware compositing.
The example linked from here demonstrates various ways of working around this problem.
来源:https://stackoverflow.com/questions/5276433/core-animation-and-anti-aliased-fonts-on-the-mac