Re: Sub-pixel font smoothing with CGBitmapContext
Re: Sub-pixel font smoothing with CGBitmapContext
- Subject: Re: Sub-pixel font smoothing with CGBitmapContext
- From: David Duncan <email@hidden>
- Date: Thu, 29 Jan 2009 12:41:48 -0800
On Jan 29, 2009, at 12:34 PM, Timothy Wood wrote:
On Jan 29, 2009, at 10:56 AM, David Duncan wrote:
Its been a while since I last looked at this, but I think the
context's format needs to be native endian (add the
kCGBitmapByteOrder32Host flag).
Heh; I totally would not have expected that from the name or docs.
But, adding a case like this in my text rendering testing harness
shows that it works. It renders into the CGBitmapContextRef such
that when I get my CALayer's contents to the resulting CGImageRef,
it has the proper device-specific antialiasing. I don't see this
mentioned anywhere in the docs, but maybe I missed it.
Yea, its not documented, and its probably more of a quirk of the font
rendering than anything else. It works today, and primarily I offer
the solution because if it stops working in the future, the worst that
will happen is you will get text that doesn't use sub-pixel
antialiasing.
If you want true control over this, then I would recommend you both
file a feature enhancement.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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