grolj4
Section: User Commands (1)
Updated: 2 July 2023
Index
Return to Main Contents
Name
grolj4 -
groff
output driver for HP LaserJet 4 and compatible printers
.nr d-fallback 1
.nr d-fallback 1
Synopsis
[
-l]
[
-c~nu-copies]
[
-d
[
n]]
[
-F~fon-directory]
[
-p~pape-format]
[
-w~lin-width]
[
file~...]
--help
-v
--version
Description
This GNU
roff
output driver translates the output of
into a PCL5 format suitable for an HP LaserJet 4 printer.
Normally,
grolj4
is invoked by
when the latter is given the
[lq]
-T~lj4[rq]
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 [lq]-[rq],
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
(BI]bol-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
[lq]
A4[rq],
[lq]
B5[rq],
[lq]
C5[rq],
[lq]
com10[rq],
[lq]
DL[rq],
[lq]
executive[rq],
[lq]
legal[rq],
[lq]
letter[rq],
and
[lq]
monarch[rq].
These are matched cas-insensitively.
The
-p
option overrides any setting in the device description file
DESC.
If neither specifies a paper format,
[lq]letter[rq] is assumed.
Font description files
grolj4
recognizes four font description file directives in addition to those
documented in
- 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
- [rs]D[aq]R~dh dv[aq]
-
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 H-GL/2,
unlike the other
[rs]D
commands.
Fonts
Nominally,
all Hewlet-Packard LaserJet~-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.2-point increments;
the Lineprinter font is available only in 8.-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~400-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 25-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,
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
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 25-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~[tmu]~
unitwidth~=~7620000.
Although HP PCL~5 LaserJet printers support an internal resolution of
7200 units per inch,
they use a 1-bit signed integer for positioning;
if
devlj4
is to support U.S. ledger paper (11~in~[mu]~17~in;
in = inch),
the maximum usable resolution is 32767~[di]~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~[mu]~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 885-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
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
[lq]S[rq] 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 H-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 H-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~nu-copies
-
Format
nu-copies
copies of each page.
- -d~[
-
n]
Use duplex mode
n:
1~is lon-side binding (default),
and 2~is shor-side binding.
- -F fon-directory
-
Prepend directory
fon-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 pape-format
-
Set the paper format to
pape-format,
which must be a valid paper format as described above.
- -w lin-width
-
Set the default line thickness to
lin-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
and
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
Index
- Name
-
- Synopsis
-
- Description
-
- Typefaces
-
- Paper format and device description file
-
- Font description files
-
- Drawing commands
-
- Fonts
-
- Options
-
- Environment
-
- Files
-
- Bugs
-
- See also
-