Several mappings are involved in the path from user program
output to console display. If the console is in utf8 mode (see
unicode_start(1))
then the kernel expects that user program output is coded as UTF-8 (see
utf-8(7)),
and converts that to Unicode (ucs2).
Otherwise, a translation table is used from the 8-bit program output
to 16-bit Unicode values. Such a translation table is called a
Unicode console map.
There are four of them: three built into the kernel, the fourth
settable using the
-m
option of
setfont.
An escape sequence chooses between these four tables; after loading a
cmap,
setfont
will output the escape sequence Esc ( K that makes it the active translation.
Suitable arguments for the
-m
option are for example
8859-1,
8859-2, ...,
8859-15,
cp437, ...,
cp1250.
Given the Unicode value of the symbol to be displayed, the kernel
finds the right glyph in the font using the Unicode mapping info
of the font and displays it.
Old fonts do not have Unicode mapping info, and in order to handle
them there are direct-to-font maps (also loaded using
-m)
that give a correspondence between user bytes and font positions.
The most common correspondence is the one given in the file
trivial
(where user byte values are used directly as font positions).
Other correspondences are sometimes preferable since the
PC video hardware expects line drawing characters in certain
font positions.
Giving a
-m none
argument inhibits the loading and activation of a mapping table.
The previous console map can be saved to a file using the
-om file
option.
These options of setfont render
mapscrn(8)
obsolete. (However, it may be useful to read that man page.)