System Administration Guide: Printing

Administering Fonts

If you have a laser printer, you might need to install and maintain PostScript fonts. For many printers, the fonts are set up as part of the printer installation process.

PostScript fonts are stored in outline form, either on the printer or on a system that communicates with the printer. When a document is printed, the PostScript interpreter generates each character as needed in the appropriate size from the outline description of it. If a font required for a document is not stored on the printer being used, the font must be transmitted to that printer before the document can be printed. This transmission process is called downloading fonts.

Fonts are stored and accessed in several ways:

Managing Printer-Resident Fonts

Most PostScript printers come equipped with fonts that are resident in the printer ROM. Some printers have a disk on which additional fonts are stored. When a printer is installed, you should add the list of printer-resident fonts to the font list for that printer. By identifying printer-resident fonts, you prevent fonts from being transmitted unnecessarily across a network. Each printer has its own list of resident fonts, which is contained in this file:


/etc/lp/printers/printer-name/residentfonts

When the printer is attached to a print server, ensure that the list in the residentfonts file includes fonts that are on the print server. The file must also include fonts that are available for downloading to the printer.

You must edit the files that contain the list of printer-resident fonts by using a text editor such as vi.

Downloading Host-Resident Fonts

When a PostScript document contains a request for fonts not loaded on the printer, the download filter manages this request. The download filter uses PostScript document structuring conventions to determine which fonts to download.

LP print filters are either fast or slow. A fast filter quickly prepares a file for printing. Also, a fast filter must have access to the printer while the filter is processing. A slow filter takes longer to convert a file. However, a slow filter does not need to access the printer while the filter is processing. An example of a slow filter is a filter that converts an ASCII document to a PostScript document.

The download filter is a fast filter. This filter downloads fonts automatically if the fonts are on the print server. The download filter can also be used to send fonts to a print server. To do so, you can create a new filter table entry that calls the download filter as a slow filter by using the lp -y command. Alternatively, you can force selection of this filter by changing the input type.

The download filter performs five tasks:

  1. The filter searches the PostScript document to determine which fonts are requested. These requests are documented with the following PostScript structuring comments: %%DocumentFonts: font1 font2 … in the header comments.

  2. The download filter searches the list of printer-resident fonts to determine if the requested font must be downloaded.

  3. If the font is not resident on the printer, the download filter searches the host-resident font directory table to determine if the requested font is available. This filter performs this search by getting the appropriate file name from the map.

  4. If the font is available, the download filter takes the file for that font and appends it to the file to be printed.

  5. The download filter sends the font definition file and the source file to the PostScript printer. The source file is the file to be printed.

Installing and Maintaining Host-Resident Fonts

Some fonts reside on the host system and are transmitted to the printer as needed for particular print requests. As the administrator, you make PostScript fonts available to all users on a system. To do so, you must know how and where to install these fonts. Because fonts are requested by name and stored in files, the LP print service keeps a map file. A map file shows the correspondence between the names of fonts and the names of the files that contain those fonts. Both the map file and the font list must be updated when you install host-resident fonts.

The fonts available for use with PostScript printers are stored in directories that you create. These directories are called /usr/share/lib/hostfontdir/typeface/font. The variable typeface is replaced by a name, such as palatino or helvetica. The variable font is replaced by a an attribute name, such as bold or italic.

ProcedureHow to Install Downloaded PostScript Fonts

  1. On the print server, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Change directory to the /etc/lp/printers/printer-name directory.


    # cd /etc/lp/printers/printer-name
    

    The variable printer-name specifies the name of the printer on which you want to install downloaded PostScript fonts.

  3. Create the residentfonts file, if this file does not already exist.


    # touch residentfonts
    

    This file might not exist if you are adding permanently downloaded fonts for the first time.

  4. Edit the residentfonts file. Add all the printer-resident fonts and the fonts to be permanently downloaded.

ProcedureHow to Install Host-Resident PostScript Fonts

  1. On the print server or the print client, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Create the hostfontdir directory.


    # cd /usr/share/lib
    
    1. Change to the /usr/share/libdirectory.


      # cd /usr/share/lib
      
    2. Create the hostfontdir directory, if this directory does not already exist.


      # mkdir hostfontdir
      
    3. Change the permissions on the hostfontdir directory to 775.


      # chmod 775 hostfontdir
      
  3. Create a directory for a new typeface, if the directory does not already exist.


    # mkdir typeface
    
  4. Copy the font file to the appropriate directory.


    # cp filename /usr/share/lib/hostfontdir/typeface/font
    
  5. Add to the map file the name of the font and the name of the file in which it resides.

    1. Change to the /usr/share/lib/hostfontdir directory.

    2. Edit the map file by using a text editor such as the vi editor.

      Add a one-line entry for each font that you want to add to the file. Put the font name first, followed by a space, followed by the name of the file where the font resides. For example:


      Palatino-Bold /usr/share/lib/hostfontdir/palatino/bold
      
    3. Save the file.

      When an example entry exists in the map file on the appropriate system, users can apply the font (for example, Palatino Bold) to their print jobs. When users submit a print request that contains this font, the LP print service appends a copy of the /usr/share/lib/hostfontdir/palatino/bold file to that file before sending it to the printer.

  6. If you are using the troff program, you must create new width tables for this font in the standard troff font directory.