Re: High-quality offscreen rendering of text?
Re: High-quality offscreen rendering of text?
- Subject: Re: High-quality offscreen rendering of text?
- From: Marcelo Alves <email@hidden>
- Date: Mon, 07 Oct 2013 01:23:05 -0300
I don’t know if you know it, but “ClearType” / antialiasing in fonts works only on opaque images, you won’t have the best rendering method possible if your background is transparent.
(From CATextLayer documentation, but I think it applies to the entire OS as well, because it makes sense : "Text can only be drawn using sub-pixel antialiasing when it is composited into an existing opaque background at the same time that it's rasterized. There is no way to draw text with sub-pixel antialiasing by itself, whether into an image or a layer, in advance of having the background pixels to weave the text pixels into”)
On 06/10/2013, at 20:32, Jens Alfke <email@hidden> wrote:
>
> On Oct 6, 2013, at 1:37 PM, Jiang Jiang <email@hidden> wrote:
>
>> Could it be that you are missing a call to:
>> CGContextSetShouldSmoothFonts(context, YES);
>> If it still doesn't work, try putting
>> CGContextSetAllowsFontSmoothing(context, YES);
>
> Thanks for the suggestion. But these calls don’t appear to make any difference, at least not on my internal retina display (haven’t tried with an external monitor yet.)
>
> BTW, even on the retina display, ordinary text is drawn with ClearType (I can tell by some of the pixels: when zooming in I see red/blue fringes.) The font samples in my app aren’t. Fortunately the difference is very subtle on this display; but on a normal-resolution display the un-ClearType-d text looks crappy.
>
> —Jens
> _______________________________________________
>
> 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
_______________________________________________
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