Go to the previous, next chapter.

Tell me about NeXTstep fonts

NeXTstep fonts are Adobe Type 1 fonts stored in ASCII (PFA) format. There are several rules about how fonts must be installed before they work.

I'd like to thank Henry for rewriting this section.

Basic Format

NeXTstep fonts live in one of three folders:

/NextLibrary/Fonts
Contains system fonts. In general, you will not install any new fonts here.

/LocalLibrary/Fonts
Contains fonts which are accessible to every user on a system or a network.

~/Library/Fonts
(where ~ is your home folder) means fonts which are private to a specific user.

A NeXTstep font is actually a folder containing various components of the font. Components are:

Font Folder and Font Filename Requirements

The name of the folder containing a font and the name of the font file itself must follow strict rules -- the names can NOT be any old name you like. For a font to work correctly, the base folder and font filename MUST BE THE SAME as the name of the outline font. This is usually the same as the value of the FontName field in the AFM file or the value of the /FontName key in the actual font itself. Suppose you have a font called Headhunter. The Headhunter font must live within a folder called

  Headhunter.font

within one of the three folders mentioned above. Within the Headhunter.font folder, you must have the two files

  Headhunter       ( the outline file )
  Headhunter.afm   ( the AFM file )

If you have a bitmap file for Headhunter, it must live in a file

  Headhunter.bepf  ( the bitmap file )

Variations such as Bold, Italic, etc., should be their own font files in their own folder. So if you have a font called Headhunter-Bold, you need to create a folder called

  Headhunter-Bold.font

within one of the three folders mentioned above. Within the Headhunter.font folder, you must have the two files

  Headhunter-Bold       ( the outline file )
  Headhunter-Bold.afm   ( the AFM file )

If you have a bitmap file for Headhunter, it must live in a file

  Headhunter-Bold.bepf  ( the bitmap file )

For NeXTstep 1.0 ONLY, you also need to take the following steps:

For NeXTstep 2.0 and up:

The font description is taken from the font folder itself, so you don't need to do this. It may be beneficial to simply create these folders and put nothing in them, but I'm not sure it matters.

Certain ``old'' applications which haven't upgraded to the NeXTstep 2.0 scheme of fonts may depend on these folders being present.

The last step is to get the system to recognize the new font(s). You may have noticed the existence of three files in the Fonts folder: .fontdirectory, .fontlist, and .afmcache. These are files the system looks at to see which fonts exist.

The easiest way to update them is to simply start up an application and open the font panel. It should recognize that the update time stamp on the Fonts folder has changed, and update the files accordingly. It is probably a good idea to simply delete the three above files beforehand.

You should get a message window saying "incorporating information on new fonts. Please wait (this may take xx seconds)". Your new fonts should be available now.

If this does not work, you can update them manually. Open up a Terminal shell and go to your Fonts folder. At the prompt, type two commands:

  buildafmdir     
  cacheAFMData afm  (the parameter is the <afm dir>)

The new fonts will not work if the cacheAFMData command is not run, and since it is an undocumented command, it is a common culprit.

[ed: the cacheAFMData step may not be required in 3.0 OS]

I believe this is true. Looks like the PasteBoard Services runs cacheAFMData in 3.0.

You should now be able to see and preview your fonts in the font panel.

If you are still having problems with your font, such as the << Unusable font >> message, consult NeXTAnswers. There are some useful suggestions for debugging faulty fonts there. It is also always helpful to look at existing fonts to see how they are installed.

One note on the NeXTAnswers. Supposedly there are only a few discrete values which are allowed to appear in the weight field of the font: ``Ultra Light'', ``Thin'', ``Light'', ``Extra Light'', ``Book'', ``Regular'', ``Plain'', ``Roman'', ``Medium'', ``Demi'', ``Demi-Bold'', ``Semi-Bold'', ``Bold'', ``Extra Bold'', ``Heavy'', ``Heavyface'', ``Black'', ``Ultra'', ``UltraBlack'', ``Fat'', ``ExtraBlack'', and ``Obese''. However, I have a few fonts where this is not the case (``standard'' is a common entry) and have had no problems as of yet. But it would probably be wiser to be on the safe side.

See below for a definitive list.


Excerpted from The comp.fonts FAQ, Copyright © 1992-96 by Norman Walsh