HP-UX Reference (11i v2 03/08) - 4 File Formats (vol 8)

t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
Specifying Printer Resolution
The printing resolution of a printer is given in several ways. Each specifies the resolution as the number
of smallest steps per distance:
Characteristic Number of Smallest Steps
orhi Steps per inch horizontally
orvi Steps per inch vertically
orc Steps per column
orl Steps per line
When printing in normal mode, each character printed causes movement to the next column, except in
special cases described later; the distance moved is the same as the per-column resolution. Some printers
cause an automatic movement to the next line when a character is printed in the rightmost position; the
distance moved vertically is the same as the per-line resolution. When printing in micro mode, these dis-
tances can be different, and may be zero for some printers.
Automatic Motion after Printing
Normal Mode:
orc Steps moved horizontally
orl Steps moved vertically
Micro Mode:
mcs Steps moved horizontally
mls Steps moved vertically
Some printers are capable of printing wide characters. The distance moved when a wide character is
printed in normal mode may be different from when a regular width character is printed. The distance
moved when a wide character is printed in micro mode may also be different from when a regular charac-
ter is printed in micro mode, but the differences are assumed to be related: If the distance moved for a
regular character is the same whether in normal mode or micro mode (mcs=orc), then the distance
moved for a wide character is also the same whether in normal mode or micro mode. This doesnt mean
the normal character distance is necessarily the same as the wide character distance, just that the dis-
tances don’t change with a change in normal to micro mode. However, if the distance moved for a regular
character is different in micro mode from the distance moved in normal mode (mcs<orc), the micro mode
distance is assumed to be the same for a wide character printed in micro mode, as the table below shows.
Automatic Motion after Printing Wide Character
Normal Mode or Micro Mode (mcs = orc):
widcs Steps moved horizontally
Micro Mode (mcs < orc):
mcs Steps moved horizontally
There may be control sequences to change the number of columns per inch (the character pitch) and to
change the number of lines per inch (the line pitch). If these are used, the resolution of the printer
changes, but the type of change depends on the printer:
Changing the Character/Line Pitches
cpi Change character pitch
cpix If set, cpi changes orhi; otherwise, changes orc
lpi Change line pitch
lpix If set, lpi changes orvi; otherwise, changes orl
chr Change steps per column
cvr Change steps per line
The cpi and lpi string capabilities are each used with a single argument, the pitch in columns (or
characters) and lines per inch, respectively. The chr and cvr string capabilities are each used with a
single argument, the number of steps per column and line, respectively.
Using any of the control sequences in these strings will imply a change in some of the values of orc,
orhi, orl, and orvi. Also, the distance moved when a wide character is printed, widcs, changes in
relation to orc. The distance moved when a character is printed in micro mode, mcs, changes similarly,
with one exception: if the distance is 0 or 1, then no change is assumed.
Programs that use cpi, lpi, chr,or cvr should recalculate the printer resolution (and should recalcu-
late other values. See the "Effect of Changing Printing Resolution" section below.
Section 4336 Hewlett-Packard Company 25 HP-UX 11i Version 2: August 2003