Previous Page | Next Page

The FONTREG Procedure

FONTFILE Statement


Specifies one or more font files to be processed.
Featured in: Adding a Single Font File

FONTFILE 'file' <...'file'> || 'file-1, pfm-file-1, afm-file-1' <...'file-n'>;


Argument

file

is the complete pathname to a font file. If the file is recognized as a valid font file, then the file is processed. Each pathname must be enclosed in quotation marks. If you specify more than one pathname, then you must separate the pathnames with a space.

pfm-file

specifies a Windows-specific file that contains font metrics as well as the value of the Windows font name.

afm-file

specifies a file that contains font metrics.


Details


Processing a Type1 Font

When a valid Type1 font is processed by the TYPE1 or the FONTPATH statements, SAS attempts to find a corresponding PFM or AFM font metric file in the same directory that contains the font file. The font filename prefix is used with the .PFM and .AFM extensions to generate metric filenames. If these files are opened successfully and are determined to be valid metric files, then they will be associated with the font in the font family when they are added to the SAS registry.

If you specify a Type1 font on the FONTFILE statement, and you do not specify a PFM or an AFM file, then SAS does not search for the PFM or the AFM files.


Specifying a PFM or an AFM File

If the font file contains a Type1 font, then you can also specify its corresponding PFM or AFM file as well. You must specify the full host name (directory and filename) for each file, and all files must be grouped together and enclosed in quotation marks, as in this example:

fontfile 'c:\winnt\fonts\alpinerg.pfb, 
          c:\winnt\fonts\alpinerg.pfm,
          c:\winnt\fonts\alpinerg.afm';

If you specify an AFM file but do not specify a PFM file, then you must use a comma as a placeholder for the missing PFM file, as in this example:

fontfile 'c:\winnt\fonts\alpinerg.pfb, , c:\winnt\fonts\alpinerg.afm';

If you specify a PFM file but do not specify an AFM file, then you do not need a comma as a placeholder for the missing AFM file, as in this example:

fontfile 'c:\winnt\fonts\alpinerg.pfb, c:\winnt\fonts\alpinerg.pfm';

When you specify a PFM or an AFM file, SAS attempts to open the file and determine whether the file is of the specified type. If it is not, then SAS writes a message to the log and the file is not used.

The PFM file is a Windows-specific file that contains font metrics as well as a value for the Windows Font Name field. If you specify a valid PFM file, then SAS opens the file, retrieves the value in Windows Font Name, and saves it with the font in the SAS registry. SAS uses this field when it creates a file (such as an EMF formatted file) to export into a Windows application.


Not Specifying a PFM or an AFM File

You do not need to specify a PFM or an AFM file along with a Type1 font file on a FONTFILE statement. In this case, no metric file information is added to the font in the font family in the SAS registry. If an existing font family that contains multiple styles and weights already exists in the SAS registry, and the FONTFILE statement is used to replace one of the fonts in that family, then all of the information for that font will be updated. The replacement also updates the Host Filename, PFM Name, AFM Name, and Windows Font Name.

Note:   If you replace a font in a family and the font contains values for the PFM Name or AFM Name, specifying a missing or invalid value for the metric on the FONTFILE statement causes the corresponding metric value to be deleted from the font in the registry.  [cautionend]

Note:   You cannot use a PFM or an AFM file specification if you specify a TrueType font.   [cautionend]

Previous Page | Next Page | Top of Page