Re: iOS 6 changes in CATextLayer text drawing
Re: iOS 6 changes in CATextLayer text drawing
- Subject: Re: iOS 6 changes in CATextLayer text drawing
- From: David Duncan <email@hidden>
- Date: Thu, 11 Oct 2012 10:54:23 -0700
On Oct 11, 2012, at 10:27 AM, Matt Neuburg <email@hidden> wrote:
>> (1) CATextLayer in iOS 6 requires an opaque background in order to antialias text. CATextLayer in iOS 5 did not have this limitation; it could antialias its text perfectly well even if its background was transparent. Why the change? I'm guessing that it's an efficiency boost.
>
> I may be confused about this one. I was put off by the fact that my text looks awful on the full-sized Retina simulator, but now it appears that it *always* looked awful on the full-sized Retina simulator. It seems that CATextLayer is **drawing** the text, not using the text system. So now I have a different problem, namely that I don't understand the note at the top of the CATextLayer class docs, since my text drawing in CATextLayer looks the same with or without an opaque background. m.
Did you set the contentsScale on your CATextLayer (or wrap it in a UIView)? By default CALayers never change their contentsScale, so if you are just using a plain CATextLayer without anything else to manage it, the contentsScale will be 1 regardless of the screen's density, making for fairly ugly text on Retina displays.
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden