Kevin Sylvestre
Kevin Sylvestre

Reputation: 38012

Core Animation and Anti Aliased Fonts on the Mac

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:

Excluding Core Animation Layer Including Core Animation Layer

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?

Upvotes: 5

Views: 1027

Answers (1)

Jens Ayton
Jens Ayton

Reputation: 14558

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.

Upvotes: 3

Related Questions