Go to the previous, next chapter.

Porting fonts to the NeXT

Porting PC/Unix Type 1 Fonts

You must have the .pfb and .afm files

A PC Adobe font is stored in binary format, so the first step is to convert it to ascii.

There are a couple of utilities out there which can do this. I think t1utils can do it, and there is a nice utility called pcATMfont2Next which has a couple of tools to do this (unfont and pfb2ps). Look for the file pcATMfont2Next.tar.Z; it is available on many ftp sites.

Also, since NeXTstep run on Unix, there is the customary problem of converting the CRs (carriage returns) that PCs use to the LFs (Linefeeds) that Unix uses. The easiest way to do this is to use tr to delete the octal for the CR character from both the .afm and outline file. The command to do this is:

   tr -d '\015' < inputfile  > outputfile

The unfont program will do this automatically when it converts the .pfb file, but pfb2ps does not. I'm not sure if t1utils' utility does or not.

Once you have the outline file, you can go ahead and install it by the process outlined above.

Otto J. Makela (otto@jyu.fi) posted a terrific cshell script to comp.fonts, which automates just about everything for you. It converts the .pfb to ASCII format, extracts the name from the FontName field, creates the font folder, copies in the component files with the correct name, and runs buildafmdir and cacheAFMData when done. A newer version of this script is now available from the standard NeXT step archives (Sonata, etc.).

Porting Mac Type 1 Fonts

A variety of programs and scripts exist to convert Macintosh format Type 1 fonts to UNIX format. Their ability to do a complete job varies. Common traps which naive font converters fall into are:

MacToPfa

Trilithon Software provides a commercial NeXTstep `MacToPfa' utility which converts Mac to NeXTstep format and installs the converted fonts for you. `MacToPfa' overcomes a lot of the problems which plague other font conversion schemes.

MetroTools

MetroSoft provides a commercial NeXTstep Mac->NeXTstep utility as a part of their MetroTools package for NeXTstep. MetroTools is a kind of Boy Scout Knife, containing a Mac to NeXTstep font converter, a Mac to NeXTstep sound converter, a screen saver, a dock extender, and others. MetroTools will not convert Macintosh fonts if it can't find AFM files. The font converter converts font formats and installs them on NeXTstep for you.

  MetroSoft, 
  San Diego, California 94028
  (619) 488 9411.
  info@metrosoft.com

Porting PC (PFB) Type 1 Fonts

Trilithon Software provides a commercial NeXTstep `PfbToPfa' utility which converts Mac to NeXTstep format and installs the converted fonts for you. `PfbToPfa' overcomes a lot of the problems which plague other font conversion schemes.