On Jun 27, 2010, at 2:18 PM, Kyle Sluder wrote:

> Be aware that this means CATextLayer will suffer the same problem. It even 
> does if you specify a background color for the layer. If you're using Core 
> Animation and want subpixel antialiasing, you have to do it yourself.


Due to the way that Core Animation works, setting the background color of a 
layer is different from drawing into the layer (you can think of it like 
drawing twice, once for the background color and once for the actual layer 
content). As such, when the text is drawn, there is only 'clear color' for the 
text to draw over, and thus you get no subpixel smoothing.

You can get subpixel smoothing in CATextLayer by subclassing and overriding 
-drawInContext: to first draw an opaque color into the target context before 
calling -[super drawInContext:].
--
David Duncan

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to