Re: NSFont to CGFontRef
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