• 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: NSFont to CGFontRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFont to CGFontRef


  • Subject: Re: NSFont to CGFontRef
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 2 Feb 2010 20:00:34 -0700

On Feb 2, 2010, at 10:26 AM, Andy O'Meara wrote:

> Given an NSFont object how can I extract or create a CGFontRef from it to use directly with CoreGraphics?

You're close. Starting in (I think) Leopard, NSFont and CTFontRef (not CGFontRef) are toll-free bridged, so you should be able to use CTFontCopyGraphicsFont() to get a CGFontRef from an NSFont.

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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

  • Follow-Ups:
    • Re: NSFont to CGFontRef
      • From: Andy O'Meara <email@hidden>
References: 
 >NSFont to CGFontRef (From: Andy O'Meara <email@hidden>)

  • Prev by Date: keyCode translation for various keyboards
  • Next by Date: Rosetta Quandry
  • Previous by thread: NSFont to CGFontRef
  • Next by thread: Re: NSFont to CGFontRef
  • Index(es):
    • Date
    • Thread