On Oct 17, 2009, at 02:37 AM, Jens Alfke wrote:


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

I certainly wouldn't want to. I spent much of the period 1988-1995 writing DOS-based and Mac-based C software to convert various Mac PostScript, TrueType, and bitmapped screen font files to Windows 1.0 and later formats, and it was frustrating and terrifying, being my first programming job right out of junior college (at the age of 45, after a career as a translator in the US Army). You probably couldn't pay me enough to do that these days. Still, I managed to convert the CasadyWare (later Casady & Greene) Fluent Laser Fonts library at a time when Fontographer ran only on the Mac, and the fonts had to be essentially hand-installed on Windows.

As I mentioned in my original post, I was able to examine only the third-party fonts that I have on my current system (140 "Font Suitcase" files, with and without the .suit extension, and 8 "Windows TrueType font" files, with the .ttf extension). (And, isn't it amazing that the 2002 version -- the last as far as I know -- of Resorcerer still runs under Snow Leopard about as well as it ever did under Panther.)

If the publisher of the software doesn't have any control over the kinds of font files that they bundle with their own software, including the file names, then the plist option is certainly the most reliable.

FYI, I haven't found any of the "Font Suitcase" files that have a data fork. The font is in the 'FOND' resource -- and all of those fonts work fine under Snow Leopard. Some of this legacy stuff is probably pretty hard to eliminate without nasty repercussions.

--Mike Wright
http://www.idata3.com/
http://www.raccoonbend.com/_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to