Next: , Previous: PS page options, Up: PostScript driver class



B.6.3 PostScript file options

Oh, my. You don't really want to know about the way that the PostScript driver deals with files, do you? Well I suppose you're entitled, but I warn you right now: it's not pretty. Here goes....

First let's look at the options that are available:

font-dir=font-directory
Sets the font directory. Default: devps.
prologue-file=prologue-file-name
Sets the name of the PostScript prologue file. You can write your own prologue, though I have no idea why you'd want to: see Prologue. Default: ps-prologue.
device-file=device-file-name
Sets the name of the Groff-format device description file. The PostScript driver reads this to know about the scaling of fonts and so on. The format of such files is described in the groff_font man page, included with Groff. Default: DESC.
encoding-file=encoding-file-name
Sets the name of the encoding file. This file contains a list of all font encodings that will be needed so that the driver can put all of them at the top of the prologue. See Encodings. Default: ps-encodings.

If the specified encoding file cannot be found, this error will be silently ignored, since most people do not need any encodings besides the ones that can be found using auto-encodings, described below.

auto-encode=boolean
When enabled, the font encodings needed by the default proportional- and fixed-pitch fonts will automatically be dumped to the PostScript output. Otherwise, it is assumed that the user has an encoding file and knows how to use it (see Encodings). There is probably no good reason to turn off this convenient feature. Default: on.

Next I suppose it's time to describe the search algorithm. When the PostScript driver needs a file, whether that file be a font, a PostScript prologue, or what you will, it searches in this manner:

  1. Constructs a path by taking the first of the following that is defined:
    1. Environment variable STAT_GROFF_FONT_PATH. See Environment variables.
    2. Environment variable GROFF_FONT_PATH.
    3. The compiled-in fallback default.
  2. Constructs a base name from concatenating, in order, the font directory, a path separator (/ or \), and the file to be found. A typical base name would be something like devps/ps-encodings.
  3. Searches for the base name in the path constructed above. If the file is found, the algorithm terminates.
  4. Searches for the base name in the standard configuration path. See File locations, for more details. If the file is found, the algorithm terminates.
  5. At this point we remove the font directory and path separator from the base name. Now the base name is simply the file to be found, i.e., ps-encodings.
  6. Searches for the base name in the path constructed in the first step. If the file is found, the algorithm terminates.
  7. Searches for the base name in the standard configuration path. If the file is found, the algorithm terminates.
  8. The algorithm terminates unsuccessfully.

So, as you see, there are several ways to configure the PostScript drivers. Careful selection of techniques can make the configuration very flexible indeed.