How to get "colored" font smoothing in a CALayer
How to get "colored" font smoothing in a CALayer
- Subject: How to get "colored" font smoothing in a CALayer
- From: James Bucanek <email@hidden>
- Date: Thu, 6 Jan 2011 11:28:31 -0700
Greetings,
The is probably more of a Carbon question than a Cocoa question,
but since the problem starts with CALayer, I'll start here first.
I have a file browser that works much the way the Finder does,
except that I'm drawing into CALayer objects using the CTLine...
family of drawing routines. The text drawn by my application
looks more "pixely" than the same text drawn in the Finder.
Here's an example:
<http://www.twilightandbarking.com/temp/auto/365/Screen shot 2011-01-06 at 11.06.26 AM.png>
The window on the left was drawn by my application. The one on
the right was drawn by the Finder. Both are blown up 400% in Photoshop.
You'll notice that the Finder draws the text with subtle
coloring, which give the appearance of smoother text (when it's
not all zoomed out, obviously).
So how can I get my text to draw as smoothly as the Finder?
Searching the forums I found a reference to "sub-pixel
smoothing". The solution was to fix some properties of the
CGBitmapContext being drawn into, but CALayer doesn't (as far as
I can tell) give you any control over the CGContext used when
drawing the content of the layer.
--
James Bucanek
_______________________________________________
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