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 BoldABIβ Arial Bold ItalicAIβ Arial ItalicARβ Arial RomanCBβ Courier BoldCBIβ Courier Bold ItalicCIβ Courier ItalicCRβ Courier RomanGBβ Garamond HalbfettGBIβ Garamond Kursiv HalbfettGIβ Garamond KursivGRβ Garamond AntiquaOBβ CG Omega BoldOBIβ CG Omega Bold ItalicOIβ CG Omega ItalicORβ CG Omega RomanOBβ CG Omega BoldOBIβ CG Omega Bold ItalicOIβ CG Omega ItalicORβ CG Omega RomanTBβ CG Times BoldTBIβ CG Times Bold ItalicTIβ CG Times ItalicTRβ CG Times RomanTNRBβ M Times BoldTNRBIβ M Times Bold ItalicTNRIβ M Times ItalicTNRRβ M Times RomanUBβ Univers BoldUBIβ Univers Bold ItalicUIβ Univers Medium ItalicURβ Univers MediumUCBβ Univers Condensed BoldUCBIβ Univers Condensed Bold ItalicUCIβ Univers Condensed Medium ItalicUCRβ Univers Condensed Medium
The following fonts are not members of a family.
ALBBβ Albertus Extra BoldALBRβ Albertus MediumAOBβ Antique Olive BoldAOIβ Antique Olive ItalicAORβ Antique Olive RomanCLARENDONβ ClarendonCORONETβ CoronetLGBβ Letter Gothic BoldLGIβ Letter Gothic ItalicLGRβ Letter Gothic RomanMARIGOLDβ 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 ton, an integer in the range-7to+7; the default is0.pclstyle nβ Set the style ton, an integer in the range0to32767; the default is0.pclproportional nβ Set the proportional spacing Boolean flag ton, which can be either0or1; the default is0.pcltypeface nβ Set the typeface family ton, an integer in the range0to65535; the default is0.
βοΈ 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\Dcommands.
π₯ 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β Formatnum-copiescopies of each page.-d [n]β Use duplex moden:1is long-side binding (default), and2is short-side binding.-F font-directoryβ Prepend directoryfont-directory/devnameto the search path for font and device description files;nameis the name of the device, usuallylj4.-lβ Format the document in landscape orientation.-p paper-formatβ Set the paper format topaper-format, which must be a valid paper format as described above.-w line-widthβ Set the default line thickness toline-widththousandths of an em; the default is40(0.04 em).
πͺ EXIT STATUS πͺ
grolj4 exits with the following statuses, and yes each one is giving its own little vibe:
- status
0on successful operation π - status
2if the program cannot interpret its command-line arguments π - status
1if 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 checktroff(1)andgroff_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 thelj4output 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 devicelj4. 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 thelj4output device, and here's the slay: she's automatically loaded bytroffrcwhen thelj4output 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 π:
- HP PCL/PJL Reference: PCL 5 Printer Language Technical Reference Manual, Part I
hpftodit(1),groff(1),troff(1),groff_out(5),groff_font(5),groff_char(7)
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
- alpine 3.24: groff-doc 1.24.2-r0 Β· GPL-3.0-or-later
- Copyright (C) 1994-2024 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms