Re: Loading NSFont from file
Re: Loading NSFont from file
- Subject: Re: Loading NSFont from file
- From: Alastair Houghton <email@hidden>
- Date: Fri, 3 Aug 2007 10:42:12 +0100
On 3 Aug 2007, at 06:51, Brad Peterson wrote:
Hi all,
Just like the subject says, I'm trying to load a font
from a resource file for use in my app.
I've tried the code posted in this thread:
http://www.cocoabuilder.com/archive/message/cocoa/2004/8/4/113647
However, it seems that most of those calls have since
been deprecated.
In any event, no fonts are loaded.
Can anyone shed some light on this, please?
What's the new & improved way to do this? :)
What's wrong with ATSFontActivateFromMemory()/
ATSFontActiveFromFileSpecification()? They don't appear to be
deprecated.
Indeed, the only problem I can see with those APIs is that there
don't seem to be any functions for dealing with an ATSFontContainer,
which makes it quite tricky to find the right arguments for NSFont's
initialiser to get yourself an NSFont representing the thing you just
loaded. (i.e. you might have to poke about in the TrueType font data
yourself, unless you somehow already know the details of the font
you've loaded).
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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