TrueType fonts are widely available but cannot be used directly in current versions of PostScript, levels 1 through 3, although, with Adobe's introduction of Open Type fonts, that may change in the future. To overcome this, several programs have been written which create a PostScript Type 1 font from a TrueType font.
With level 2.013 PostScript, Adobe introduced a new font category, Type 42, which is, to use Adobe's own words, a TrueType font wrapped in some PostScript code. Actually the complexity of the conversion is considerably more than the word wrapped implies and, although the preponderant view is that the use of Type 42 gives better printed output than conversion to Type 1, few programs for the conversion to Type 42 exist.
This document describes the use of the PostScript program TrueTypeToType42.ps to generate the equivalent PostScript Type 42 font file from a TrueType font file. The actual work of wrapping is done by the GhostScript procedure .loadttfont and this program simply operates on the resulting file. I don't know when .loadttfont was introduced into GhostScript but I developed this program using version 6.5 and am now using it with version 7.0.
You will probably wish to make two minor changes to the program before running it.
TrueTypeToType42.ps is run under GhostScript from the command prompt with the command line:
<Full path name of GhostScript executable>
-I<Full path to the GhostScript main folder>
-- <Full path name of the conversion program?
<Full path name of the TrueType font?
The program generates three files, all in a folder of your choice (see Preliminaries above). The files are:
The folder into which these files are placed is defined in the setup section of the program as the value of the key /Path. This must be set to suit your system. Go to the program line %%BeginSetup. After it you will find a few lines of comments and the line in question. Modify the contents of the string being careful to maintain the parentheses enclosing it. Note that the folder must already exist, the program will not create it for you.
Since TrueTypeToType42.ps is a PostScript file, it should run on any platform, i.e. Unix, Linux, Macs, PCs, provided there is a recent version of GhostScript installed. I am not sure of the precise meaning of recent but I have run the program under GhostScript 6.5 and 7.0.
The Type 42 file has the extension .pfa and can be treated as a normal .pfa file. For example:
What follows is a description of the way I run TrueTypeToType42 on my system which is a PC under Windows 2000. I hope they will provide pointers to its use in other systems. I am currently using GhostScript 7.00.
A large number of TrueType fonts came with my copy of Windows 2000. They are by default placed in folder C:\Winnt\Fonts. This folder has special properties for working with the Windows font software and I have found it more convenient to keep a copy of all TrueType fonts in folder C:\TrueTypeFonts and to convert them from there.
My command line is:
C:\TrueTypeFonts\<name of the TrueType font file>
To get round the great length of this command, I have created a batch file called TTF2T42WE.bat. This can be run from the Windows command prompt but I find it more convenient to run it from within Windows Explorer.
To run it from the Windows command prompt, first place a copy of TTF2T42WE.bat in a folder on your path. I have it in C:\BatchFiles. Then, at the comman prompt, enter TTF2T42WE followed by the full path name of the TrueType font to be converted. Pressing Enter will then start the program and create the three output files. If the current folder is the one containing the TrueType file, you can enter only the name of the TrueType file rather than its full path name.
If you prefer to operate from Windows Explorer, as I do, place a copy of TTF2T42WE.bat in your SendTo folder which in my case is:
C:\Documents and Settings\Thomas H. Barton\SendTo
To use this batch file:
Thomas H. Barton, April 2002