• 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: Loading NSFont from file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Loading NSFont from file (From: Brad Peterson <email@hidden>)

  • Prev by Date: Re: Absolute path to the Application
  • Next by Date: Problem creating CVPixelBufferPool using CVPixelBufferPoolCreate
  • Previous by thread: Loading NSFont from file
  • Next by thread: Re: [SOLVED] Loading NSFont from file
  • Index(es):
    • Date
    • Thread