grolj4(1)

🌸 grolj4(1) β€” General Commands Manual 🌸

okay bestie, welcome to grolj4(1) from the General Commands Manual β€” the groff output driver for HP LaserJet 4 and compatible printers, and yes we are folding that manual-name energy right in at the top so nothing gets lost πŸ’–


πŸŽ€ 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 a Hewlett-Packard 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. It writes 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. For the convenience of a consistent font repertoire in groff, lj4.tmac (see section β€œFiles” below) uses ftr requests to remap H (β€œHelvetica”) font names to the U names shown below.

  • 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, HP LaserJet 4-series and newer printers have the same internal fonts. 45 fonts are scalable from 0.25 to 999.75 points in 0.25-point increments. A Lineprinter font is available only at 8.5 points.

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 ISO Latin-2 (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.24.2/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. so no lingering, bestie πŸ‘‹

  • -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).

πŸšͺ EXIT STATUS πŸšͺ

grolj4 exits with the following statuses, and yes each one is giving its own little vibe:

  • status 0 on successful operation πŸŽ‰
  • status 2 if the program cannot interpret its command-line arguments 😭
  • status 1 if it encounters an error during operation πŸ’€

🌱 ENVIRONMENT 🌱

okay so there's literally one (1) env var here and she's important, bestie, listen up:

  • GROFF_FONT_PATH β€” this girly holds a list of directories, and those directories are where groff goes looking for the selected output device's directory of device and font description files. that's it, that's the whole vibe. and if you want the full lore, go check troff(1) and groff_font(5). iykyk πŸ’…

πŸŽ€ FILES πŸŽ€

these are the icons, the main characters of the file system, all living under /usr/share/groff/1.24.2/:

  • /usr/share/groff/1.24.2/font/devlj4/DESC β€” this one describes the lj4 output device. it's giving "hello, i'm the device descriptor" energy πŸ¦‹
  • /usr/share/groff/1.24.2/font/devlj4/F β€” and this one describes the font known as F on device lj4. yes, the font is literally named F. no cap, that's its name πŸ’€
  • /usr/share/groff/1.24.2/tmac/lj4.tmac β€” the macro queen πŸ‘‘ she defines macros for use with the lj4 output device, and here's the slay: she's automatically loaded by troffrc when the lj4 output device is selected. no manual setup, she just shows up. periodt ✨

πŸ’€ BUGS πŸ’€

small dots.

…that's it. that's the entire bug report. i'm not kidding, that's literally what it says 😭 so if you hit something weird with tiny little dots, bestie, now you know β€” it's documented right here. iconic, honestly.


πŸ”₯ SEE ALSO πŸ”₯

further reading for when you're in your research era πŸ“š:


and that's the whole page, bestie!! 🫢 this lil manual comes to you courtesy of groff 1.24.2, dated 2026-10-01 β€” go forth and print your dots (small or otherwise) πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from