• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Text rendered in NSImage is fuzzy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text rendered in NSImage is fuzzy


  • Subject: Re: Text rendered in NSImage is fuzzy
  • From: David Duncan <email@hidden>
  • Date: Sun, 27 Jun 2010 14:30:19 -0700

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@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

References: 
 >Text rendered in NSImage is fuzzy (From: Dave Fernandes <email@hidden>)
 >Re: Text rendered in NSImage is fuzzy (From: Uli Kusterer <email@hidden>)
 >Re: Text rendered in NSImage is fuzzy (From: Ken Ferry <email@hidden>)
 >Re: Text rendered in NSImage is fuzzy (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Text rendered in NSImage is fuzzy
  • Next by Date: Re: using UTF-32 in NSString.
  • Previous by thread: Re: Text rendered in NSImage is fuzzy
  • Next by thread: Re: Text rendered in NSImage is fuzzy
  • Index(es):
    • Date
    • Thread