• 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 to retrieve the font information from TrueType font file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to retrieve the font information from TrueType font file?


  • Subject: Re: How to retrieve the font information from TrueType font file?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 16 Oct 2009 23:37:29 -0700


On Oct 16, 2009, at 10:31 PM, Mike Wright wrote:

1. Single Fonts with the ".ttf" file extension have only a data fork, and the name of the file seems to be the name of the font.

Not necessarily. The filename is not part of the font, so it can be arbitrary, and a lot of the time it's not the same as the font name.


b. The other style has a resource fork that includes a 'FOND' resource for each individual font, with the 'FOND' resource names being the names of the fonts. They also include 'sfnt' resources, but the 'sfnt' resources do not have names. (They just have resource IDs that match the resource IDs of the corresponding 'FOND' resources.)

I don't know if the FOND resource is even used anymore. (That's all legacy stuff dating back to about 1986.) The actual font name is in the TrueType font tables making up the 'sfnt' resources.


There are a number of other formats you didn't list, like .otf, .ttc and .dfnt. I think it's still possible to have raw Type 1 PostScript fonts installed, although I don't know what the filetype for those would be. (They used to be files with HFS type 'LWFN'.)

You really, really don't want to mess with this stuff directly, unless you'd like to spend months learning all about the intricacies of font formats.

—Jens_______________________________________________

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 to retrieve the font information from TrueType font file?
      • From: Mike Wright <email@hidden>
References: 
 >Re: How to retrieve the font information from TrueType font file? (From: Mike Wright <email@hidden>)

  • Prev by Date: Re: Extract plain text content from a Text View
  • Next by Date: Re: Extract plain text content from a Text View
  • Previous by thread: Re: How to retrieve the font information from TrueType font file?
  • Next by thread: Re: How to retrieve the font information from TrueType font file?
  • Index(es):
    • Date
    • Thread