grolj4(1)

Name
grolj4 - groff output driver for HP LaserJet 4 and compatible printers

Synopsis
grolj4 [-l] [-c num-copies] [-d [n]] [-F font-directory] [-p paper-format] [-w line-width] [file ...]
grolj4 --help
grolj4 -v
grolj4 --version

Description
This GNU roff output driver translates the output of troff(1) into a PCL5 format suitable for an HP LaserJet 4 printer. Normally, grolj4 is invoked by groff(1) when the latter is given the “-T lj4” option. (In this installation, ps is the default output device.) Use groff's -P option to pass any options shown above to grolj4. If no file arguments are given, or if file is “-”, grolj4 reads the standard input stream. Output is written to the standard output stream.

  Typefaces
grolj4 supports the standard four styles: R (roman), I (italic), B (bold), and BI (bold-italic). Fonts are grouped into families A, C, G, O, T, TN, U, and UC having members in each style.

    AB  Arial Bold
    ABI
        Arial Bold Italic
    AI
        Arial Italic
    AR
        Arial Roman
    CB
        Courier Bold
    CBI
        Courier Bold Italic
    CI
        Courier Italic
    CR
        Courier Roman
    GB
        Garamond Halbfett
    GBI
        Garamond Kursiv Halbfett
    GI
        Garamond Kursiv
    GR
        Garamond Antiqua
    OB
        CG Omega Bold
    OBI
        CG Omega Bold Italic
    OI
        CG Omega Italic
    OR
        CG Omega Roman
    OB
        CG Omega Bold
    OBI
        CG Omega Bold Italic
    OI
        CG Omega Italic
    OR
        CG Omega Roman
    TB
        CG Times Bold
    TBI
        CG Times Bold Italic
    TI
        CG Times Italic
    TR
        CG Times Roman
    TNRB
        M Times Bold
    TNRBI
        M Times Bold Italic
    TNRI
        M Times Italic
    TNRR
        M Times Roman
    UB
        Univers Bold
    UBI
        Univers Bold Italic
    UI
        Univers Medium Italic
    UR
        Univers Medium
    UCB
        Univers Condensed Bold
    UCBI
        Univers Condensed Bold Italic
    UCI
        Univers Condensed Medium Italic
    UCR
        Univers Condensed Medium

The following fonts are not members of a family.

    ALBB
        Albertus Extra Bold
    ALBR
        Albertus Medium
    AOB
        Antique Olive Bold
    AOI
        Antique Olive Italic
    AOR
        Antique Olive Roman
    CLARENDON
        Clarendon
    CORONET
        Coronet
    LGB
        Letter Gothic Bold
    LGI
        Letter Gothic Italic
    LGR
        Letter Gothic Roman
    MARIGOLD
        Marigold

The special font is S (PostScript Symbol); SYMBOL (M Symbol), and WINGDINGS (Wingdings) are also available but not mounted by default.

  Paper format and device description file
grolj4 supports paper formats “A4”, “B5”, “C5”, “com10”, “DL”, “executive”, “legal”, “letter”, and “monarch”. These are matched case-insensitively. The -p option overrides any setting in the device description file DESC. If neither specifies a paper format, “letter” is assumed.

  Font description files
grolj4 recognizes four font description file directives in addition to those documented in groff_font(5).

pclweight n
    Set the stroke weight to n, an integer in the range -7 to +7; the default is 0.

pclstyle n
    Set the style to n, an integer in the range 0 to 32767; the default is 0.

pclproportional n
    Set the proportional spacing Boolean flag to n, which can be either 0 or 1; the default is 0.

pcltypeface n
    Set the typeface family to n, an integer in the range 0 to 65535; the default is 0.

  Drawing commands
An additional drawing command is recognized as an extension to those documented in groff(7).

\D'R dh dv'
    Draw a rule (solid black rectangle) with one corner at the drawing position, and the diagonally opposite corner at the drawing position +(dh,dv), at which the drawing position will be afterward. This generates a PCL fill rectangle command, and so will work on printers that do not support HP-GL/2, unlike the other \D commands.

  Fonts
Nominally, all Hewlett-Packard LaserJet 4-series and newer printers have the same internal fonts: 45 scalable fonts and one bitmapped Lineprinter font. The scalable fonts are available in sizes between 0.25 points and 999.75 points, in 0.25-point increments; the Lineprinter font is available only in 8.5-point size.

The LaserJet font files included with groff assume that all printers since the LaserJet 4 are identical. There are some differences between fonts in the earlier and more recent printers, however. The LaserJet 4 printer used Agfa Intellifont technology for 35 of the internal scalable fonts; the remaining 10 scalable fonts were TrueType. Beginning with the LaserJet 4000-series printers introduced in 1997, all scalable internal fonts have been TrueType. The number of printable glyphs differs slightly between Intellifont and TrueType fonts (generally, the TrueType fonts include more glyphs), and there are some minor differences in glyph metrics. Differences among printer models are described in the PCL 5 Comparison Guide and the PCL 5 Comparison Guide Addendum (for printers introduced since approximately 2001).

LaserJet printers reference a glyph by a combination of a 256-glyph symbol set and an index within that symbol set. Many glyphs appear in more than one symbol set; all combinations of symbol set and index that reference the same glyph are equivalent. For each glyph, hpftodit(1) searches a list of symbol sets, and selects the first set that contains the glyph. The printing code generated by hpftodit is an integer that encodes a numerical value for the symbol set in the high byte(s), and the index in the low byte. See groff_font(5) for a complete description of the font file format; symbol sets are described in greater detail in the PCL 5 Printer Language Technical Reference Manual.

Two of the scalable fonts, Symbol and Wingdings, are bound to 256-glyph symbol sets; the remaining scalable fonts, as well as the Lineprinter font, support numerous symbol sets, sufficient to enable printing of more than 600 glyphs.

The metrics generated by hpftodit assume that the DESC file contains values of 1200 for res and 6350 for unitwidth, or any combination (e.g., 2400 and 3175) for which res × unitwidth = 7620000. Although HP PCL 5 LaserJet printers support an internal resolution of 7200 units per inch, they use a 16-bit signed integer for positioning; if devlj4 is to support U.S. ledger paper (11 in × 17 in; in = inch), the maximum usable resolution is 32767 ÷ 17, or 1927 units per inch, which rounds down to 1200 units per inch. If the largest required paper dimension is less (e.g., 8.5 in × 11 in, or A5), a greater res (and lesser unitwidth) can be specified.

Font metrics for Intellifont fonts were provided by Tagged Font Metric (TFM) files originally developed by Agfa/Compugraphic. The TFM files provided for these fonts supported 600+ glyphs and contained extensive lists of kerning pairs.

To accommodate developers who had become accustomed to TFM files, HP also provided TFM files for the 10 TrueType fonts included in the LaserJet 4. The TFM files for TrueType fonts generally included less information than the Intellifont TFMs, supporting fewer glyphs, and in most cases, providing no kerning information. By the time the LaserJet 4000 printer was introduced, most developers had migrated to other means of obtaining font metrics, and support for new TFM files was very limited. The TFM files provided for the TrueType fonts in the LaserJet 4000 support only the Latin 2 (ISO 8859-2) symbol set, and include no kerning information; consequently, they are of little value for any but the most rudimentary documents.

Because the Intellifont TFM files contain considerably more information, they generally are preferable to the TrueType TFM files even for use with the TrueType fonts in the newer printers. The metrics for the TrueType fonts are very close, though not identical, to those for the earlier Intellifont fonts of the same names. Although most output using the Intellifont metrics with the newer printers is quite acceptable, a few glyphs may fail to print as expected. The differences in glyph metrics may be particularly noticeable with composite parentheses, brackets, and braces used by eqn(1). A script, located in /usr/share/groff/1.23.0/font/devlj4/generate, can be used to adjust the metrics for these glyphs in the special font “S” for use with printers that have all TrueType fonts.

At the time HP last supported TFM files, only version 1.0 of the Unicode standard was available. Consequently, many glyphs lacking assigned code points were assigned by HP to the Private Use Area (PUA). Later versions of the Unicode standard included code points outside the PUA for many of these glyphs. The HP-supplied TrueType TFM files use the PUA assignments; TFM files generated from more recent TrueType font files require the later Unicode values to access the same glyphs. Consequently, two different mapping files may be required: one for the HP-supplied TFM files, and one for more recent TFM files.

Options
--help displays a usage message, while -v and --version show version information; all exit afterward.

-c num-copies
    Format num-copies copies of each page.

-d [
    n] Use duplex mode n: 1 is long-side binding (default), and 2 is short-side binding.

-F font-directory
    Prepend directory font-directory/devname to the search path for font and device description files; name is the name of the device, usually lj4.

-l  Format the document in landscape orientation.

-p paper-format
    Set the paper format to paper-format, which must be a valid paper format as described above.

-w line-width
    Set the default line thickness to line-width thousandths of an em; the default is 40 (0.04 em).

Environment

GROFF_FONT_PATH
    lists directories in which to seek the selected output device's directory of device and font description files. See troff(1) and groff_font(5).

Files

/usr/share/groff/1.23.0/font/devlj4/DESC
    describes the lj4 output device.

/usr/share/groff/1.23.0/font/devlj4/F
    describes the font known as F on device lj4.

/usr/share/groff/1.23.0/tmac/lj4.tmac
    defines macros for use with the lj4 output device. It is automatically loaded by troffrc when the lj4 output device is selected.

Bugs
Small dots.

See also
HP PCL/PJL Reference: PCL 5 Printer Language Technical Reference Manual, Part I (http://www.hp.com/ctg/Manual/bpl13210.pdf)

hpftodit(1), groff(1), troff(1), groff_out(5), groff_font(5), groff_char(7)