• 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: Replacement for CGContextSelectFont ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacement for CGContextSelectFont ?


  • Subject: Re: Replacement for CGContextSelectFont ?
  • From: Graham Cox <email@hidden>
  • Date: Sun, 18 Sep 2016 20:38:43 +1000

> On 18 Sep 2016, at 7:24 PM, Gabriel Zachmann <email@hidden> wrote:
>
> But if anyone could suggest modifications to make it better (e.g., remove a bug, make it simpler, or more future proof),
> I will greatly appreciate it.


Have you looked at or tried CATextLayer? It already does all of this internally - you just have to set up its font, size, string, etc.

Since you’re drawing this into a CALayer anyway, I think you’re going to lose the sub-pixel antialiasing that you get using Core Graphics. I think (but maybe misremembered) that CATextLayer does something to ensure that works. But even if it doesn’t, it’ll still be a better option than replicating its functionality.

—Graham



_______________________________________________

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: 
 >Replacement for CGContextSelectFont ? (From: Gabriel Zachmann <email@hidden>)
 >Re: Replacement for CGContextSelectFont ? (From: Alex Kac <email@hidden>)
 >Re: Replacement for CGContextSelectFont ? (From: Graham Cox <email@hidden>)
 >Re: Replacement for CGContextSelectFont ? (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: How to make Xcode launch a different app when "Running" my code?
  • Next by Date: Re: How to make Xcode launch a different app when "Running" my code?
  • Previous by thread: Re: Replacement for CGContextSelectFont ?
  • Next by thread: "Live" NSFetchRequest?
  • Index(es):
    • Date
    • Thread