HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)

t
terminfo(4) terminfo(4)
(ENHANCED CURSES)
It is assumed that enhanced printing modes are independent modes, so that it would be possible, for
instance, to shadow print italicized subscripts.
As mentioned earlier, the amount of motion automatically made after printing a wide character should be
given in widcs.
If only a subset of the printable ASCII characters can be printed as superscripts or subscripts, they should
be listed in supcs or subcs strings, respectively. If the ssupm or ssubm strings contain control
sequences, but the corresponding supcs or subcs strings are empty, it is assumed that all printable
ASCII characters are available as superscripts or subscripts.
Automatic motion made after printing a superscript or subscript is assumed to be the same as for regular
characters. Thus, for example, printing any of the following three examples results in equivalent motion:
Bi B
i
B
i
Note that the existing msgr boolean capability describes whether motion control sequences can be used
while in "standout mode". This capability is extended to cover the enhanced printing modes added here.
msgr should be set for those printers that accept any motion control sequences without affecting shadow,
italicized, widened, superscript, or subscript printing. Conversely, if msgr is not set, a program should end
these modes before attempting any motion.
Alternate Character Sets
In addition to allowing you to define line graphics (described in the Line Graphics subsection of the
Insert/Delete Character section above), terminfo lets you define alternate character sets. The following
capabilities cover printers and terminals with multiple selectable or definable character sets:
Alternate Character Sets
scs Select character set N
scsd Start definition of character set N, M characters
defc Define character A, B dots wide, descender D
rcsd End definition of character set N
csnm List of character set names
daisy Printer has manually changed print-wheels
The scs, rcsd, and csnm strings are used with a single argument, N, a number from 0 to 63 that
identifies the character set. The scsd string is also used with the argument N and another, M, that gives
the number of characters in the set. The defc string is used with three arguments: A gives the ASCII
code representation for the character, B gives the width of the character in dots, and D is zero or one
depending on whether the character is a "descender" or not. The defc string is also followed by a string of
"image-data" bytes that describe how the character looks (see below).
Character set 0 is the default character set present after the printer has been initialized. Not every printer
has 64 character sets, of course; using scs with an argument that doesn’t select an available character set
should cause a null pointer to be returned by tparm() (see tigetflag(3X)).
If a character set has to be defined before it can be used, the scsd control sequence is to be used before
defining the character set, and the rcsd is to be used after. They should also cause a NULL pointer to be
returned by tparm() when used with an argument N that doesn’t apply. If a character set still has to be
selected after being defined, the scs control sequence should follow the rcsd control sequence. By exa-
mining the results of using each of the scs, scsd, and rcsd strings with a character set number in a call
to tparm(), a program can determine which of the three are needed.
Between use of the scsd and rcsd strings, the defc string should be used to define each character. To
print any character on printers covered by terminfo, the ASCII code is sent to the printer. This is true
for characters in an alternate set as well as "normal" characters. Thus the definition of a character includes
the ASCII code that represents it. In addition, the width of the character in dots is given, along with an
indication of whether the character should descend below the print line (such as the lower case letter "g"in
most character sets). The width of the character in dots also indicates the number of image-data bytes that
will follow the defc string. These image-data bytes indicate where in a dot-matrix pattern ink should be
applied to "draw" the character; the number of these bytes and their form are defined in the Dot-Matrix
Graphics section below.
It’s easiest for the creator of terminfo entries to refer to each character set by number; however, these
numbers will be meaningless to the application developer. The csnm string alleviates this problem by pro-
viding names for each number.
516 Hewlett-Packard Company 32 HP-UX 11i Version 3: February 2007