• 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: How do I embed a font in an app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I embed a font in an app?


  • Subject: Re: How do I embed a font in an app?
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 6 Apr 2008 09:43:26 -0700


On 4 Apr '08, at 3:37 PM, Jens Alfke wrote:

In my application's user interface I want to use some TrueType fonts which are not built into the OS. (Yes, they're free and their licenses allow this sort of use.) I thought I remembered a way to embed fonts in an application bundle, or to programmatically load a font from a file; but I'm drawing a blank now when I try to look it up.

FYI, Ben Stiglitz emailed me an even simpler solution that requires no code at all:


Begin forwarded message:

From: Benjamin Stiglitz <email@hidden> Date: 4 April, 2008 11:02:06 PM PDT To: Jens Alfke <email@hidden> Subject: Re: How do I embed a font in an app?

ATSFontActivateFromFileSpecification is deprecated in Leopard, but the new replacement function, ATSFontActivateFromFileReference, is identical except for taking an FSRef instead of an FSSpec. So it makes the code even simpler.

Even better is an Info.plist key for all the fonts you could want: ATSApplicationFontsPath.
http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#/ /apple_ref/doc/uid/20001431-SW8


-Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: How do I embed a font in an app?
      • From: "Kyle Sluder" <email@hidden>
References: 
 >How do I embed a font in an app? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Objective-C Instance Variable Names
  • Next by Date: Re: Place NSView into NSView
  • Previous by thread: Re: How do I embed a font in an app?
  • Next by thread: Re: How do I embed a font in an app?
  • Index(es):
    • Date
    • Thread