« Apple X11 + Fink + FinkCommander? It just works... | Main | "feel my ribs" »

19 February 2003

moving NEXTSTEP fonts to OS X

So why all the sudden interest in X11? Well, while scrolling through the software in FinkCommander I came across Fondu. Fondu and its counterpart ufond convert back and forth between Mac and UNIX font formats.

For the last 2+ years I've been looking to move a bunch of fonts from NEXTSTEP to Mac OS X. It's all PostScript of one flavor or another, so it ought to just work. It doesn't. You need to convert them. But until this weekend, I couldn't find any free tools that would do the job. t1utils really wasn't doing it. Some would convert, most wouldn't. Would Fondu solve my problems? The short answer, after much experimentation, is No.

But, in researching Fondu I stumbled across PfaEdit by the same author. PfaEdit reads in .pfa files (PostScript font definitions) and writes them out as .dfonts! (.dfonts are flattened Mac font files, with no resource fork. OS X understands them natively, with no need to put them in the Classic system folder. I don't have Classic (or even OS 9) installed, so that's a big help.) To my surprise and delight, PfaEdit even comes with an OS X specific installer, though it requires X11 for display. Would this finally do the job? Yes, it worked the first time!

Surprisingly, there's not a lot of information out there on how to move fonts from NEXTSTEP to OS X. The Omni Lists have had a couple of threads over the years, but the question, as far as I can tell, had never been resolved. Here's my answer:

On NEXTSTEP, fonts are stored in .font directories (file wrappers) that contain a number of files that make up the font. The only one, that I can tell, of interest is the file inside the wrapper (named the same as the name of the font) without any extension. This is the PostScript outline definition of the font in ASCII form, also known as a PFA file. Copy this file over to the Mac and add the .pfa extension. Fire up X11 and PfaEdit. Open the .pfa file in PfaEdit and hit File > Generate Fonts.... Save it as type .dfont and put that in ~/Library/Fonts. OS X apps should recognize the new font immediately. (No more buildafmdir!)

OS X does the right thing by reading each .dfont file (or other files of known type in the various Library/Font directories) and orders them by family and weight in the Font panel. Using a single .dfont file for every corresponding .font under NeXTstep keeps it simple. No need to create multifont/family suitcases. No need to mess with resource forks. It just works. OS X and PfaEdit win the day!

A couple of tips:

  • it doesn't appear that PfaEdit or Quartz care a thing for NEXTSTEP's .afm files, nor do they appear to need them. Just convert the PFAs and everything seems happy. I checked both on-screen and printed versions of many of the converted fonts, and they looked fine.

  • use PfaEdit to tweak the family names for better presentation in the font panel, if needed. One reason why I've pursued this on and off for a couple of years is that I have the complete set of Adobe Garamond fonts, purchased from Adobe 100 years ago in a former life. You can't even get a few of these faces from Adobe any more. What happened to Titling Capitals?

    To keep the font panel sane, I needed to make three familes, Adobe Garamond, Abode Garamond Alt, and Adobe Garamond Expert. PfaEdit made this easy. Element > Font Info... and away you go.

    The thing is, after finally getting all these fonts transferred and converted, I've come to the realization that the fonts you get with OS X are much more versatile, with a much cleaner look than anything in the Adobe Font Collection for NeXTstep. Digital typography has certainly improved in 10 years. I use Lucida and Cochin (included with Mac OS X) on a daily basis and like them better than anything from NEXTSTEP.

    Still, I'm glad to see Tekton again...

  • Category Archive
    Arts & Letters
    Canine
    Ether
    Gastronomy
    Legalese
    slow
    Technogeek