1 .TH SETFONT 8 "11 Feb 2001" "" "International Support"
3 setfont \- load EGA/VGA console screen font
6 .RI "[-O " "font+umap.orig" "] [-o " "font.orig" ]
7 .RI "[-om " "cmap.orig" ]
8 .RI "[-ou " "umap.orig" ]
9 .RI "[-" "N" "] [" "font.new ..." ]
14 .IX "setfont command" "" "\fLsetfont\fR command"
18 command reads a font from the file
20 and loads it into the EGA/VGA character generator,
21 and optionally outputs the previous font.
22 It can also load various mapping tables
23 and output the previous versions.
25 If no args are given (or only the option
31 font is loaded (see below).
32 One may give several small fonts, all containing
35 will combine them and load the union.
41 .B "setfont drdos8x16"
42 Load a given font (here the 448-glyph drdos font).
44 .B "setfont cybercafe -u cybercafe"
45 Load a given font that does not have a Unicode map
46 and provide one explicitly.
48 .B "setfont LatArCyrHeb-19 -m 8859-2"
49 Load a given font (here a 512-glyph font combining several
50 character sets) and indicate that one's local character set
54 The standard Linux font format is the PSF font.
55 It has a header describing font properties like character size,
56 followed by the glyph bitmaps, optionally followed by a Unicode mapping
57 table giving the Unicode value for each glyph.
58 Several other (obsolete) font formats are recognized.
59 If the input file has code page format (probably with suffix .cp),
60 containing three fonts with sizes e.g. 8x8, 8x14 and 8x16, then one of
61 the options \-8 or \-14 or \-16 must be used to select one.
62 Raw font files are binary files of size
64 bytes, containing bit images for each of 256 characters,
65 one byte per scan line, and
67 bytes per character (0 <
70 Most fonts have a width of 8 bits, but with the framebuffer device (fb)
71 other widths can be used.
76 has no built-in knowledge of VGA video modes, but just asks
77 the kernel to load the character ROM of the video card with
78 certain bitmaps. However, since Linux 1.3.1 the kernel knows
79 enough about EGA/VGA video modes to select a different line
80 distance. The default character height will be the number
82 inferred from the font or specified by option. However, the
83 user can specify a different character height
90 Several mappings are involved in the path from user program
91 output to console display. If the console is in utf8 mode (see
92 .BR unicode_start (1))
93 then the kernel expects that user program output is coded as UTF-8 (see
95 and converts that to Unicode (ucs2).
96 Otherwise, a translation table is used from the 8-bit program output
97 to 16-bit Unicode values. Such a translation table is called a
98 .IR "Unicode console map" .
99 There are four of them: three built into the kernel, the fourth
104 An escape sequence chooses between these four tables; after loading a
107 will output the escape sequence Esc ( K that makes it the active translation.
109 Suitable arguments for the
111 option are for example
118 Given the Unicode value of the symbol to be displayed, the kernel
119 finds the right glyph in the font using the Unicode mapping info
120 of the font and displays it.
122 Old fonts do not have Unicode mapping info, and in order to handle
123 them there are direct-to-font maps (also loaded using
125 that give a correspondence between user bytes and font positions.
126 The most common correspondence is the one given in the file
128 (where user byte values are used directly as font positions).
129 Other correspondences are sometimes preferable since the
130 PC video hardware expects line drawing characters in certain
135 argument inhibits the loading and activation of a mapping table.
136 The previous console map can be saved to a file using the
139 These options of setfont render
141 obsolete. (However, it may be useful to read that man page.)
143 .SH "UNICODE FONT MAPS"
144 The correspondence between the glyphs in the font and
145 Unicode values is described by a Unicode mapping table.
146 Many fonts have a Unicode mapping table included in
147 the font file, and an explicit table can be indicated using
152 will load such a Unicode mapping table, unless a
154 argument is given. The previous Unicode mapping table
155 will be saved as part of the saved font file when the \-O
156 option is used. It can be saved to a separate file using the
159 These options of setfont render
163 The Unicode mapping table should assign some glyph to
164 the `missing character' value U+fffd, otherwise missing
165 characters are not translated, giving a usually very confusing
168 Usually no mapping table is needed, and a Unicode mapping table
169 is already contained in the font (sometimes this is indicated
170 by the .psfu extension), so that most users need not worry
171 about the precise meaning and functioning of these mapping tables.
173 One may add a Unicode mapping table to a psf font using
179 Override font height.
182 Load console map or Unicode console map from
186 Save previous font in
190 Save previous font and Unicode map in
198 Save previous Unicode map in
202 Load Unicode table describing the font from
209 Print version and exit.
212 .I @datadir@/consolefonts
213 is the default font directory.
215 is the default directory for Unicode maps.
216 .I @datadir@/consoletrans
217 is the default directory for screen mappings.
218 The default font is a file
222 if the \-N option was given for some number N)
223 perhaps with suitable extension (like .psf).
226 .BR unicode_start (1),
231 .\" Eugene G. Crosser (crosser@pccross.msk.su)
233 .\" Andries E. Brouwer (aeb@cwi.nl)