version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
CONSOLECHARS |
|
|
2 |
!!!CONSOLECHARS |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
COMMANDS |
|
|
8 |
HISTORY |
|
|
9 |
FILES |
|
|
10 |
BUGS |
|
|
11 |
AUTHORS |
|
|
12 |
SEE ALSO |
|
|
13 |
---- |
|
|
14 |
!!NAME |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
consolechars - load EGA/VGA console screen font, screen-font map, and/or application-charset map. |
|
|
18 |
!!SYNOPSIS |
|
|
19 |
|
|
|
20 |
|
|
|
21 |
__consolechars [[__''-v''__|__''--verbose''__] |
|
|
22 |
[[__''-V''__|__''--version''__] |
|
|
23 |
[[__''-h''__|__''--help''__] |
|
|
24 |
[[__''-1''__|__''--g1''__] |
|
|
25 |
[[__''-n''__|__''--no-act''__] |
|
|
26 |
[[__''--force-no-sfm''__] |
|
|
27 |
[[__''-H''__|__''--char-height=N''__] |
|
|
28 |
[[__''--tty=device''__] |
|
|
29 |
[[__''-m''__|__''--acm=''__|__''--app-charset-map=acm''__] |
|
|
30 |
[[__''-M''__|__''--old-acm=acm.orig''__] |
|
|
31 |
[[__''-f''__|__''--font=font.new''__] |
|
|
32 |
[[__''-F''__|__''--old-font=font.orig''__] |
|
|
33 |
[[__''--old-font-raw=font.orig''__] |
|
|
34 |
[[__''--old-font-psf-with-sfm=font.orig.psf''__] |
|
|
35 |
[[__''--old-font-psf=font.orig.psf''__] |
|
|
36 |
[[__''-u''__|__''--sfm=''__|__''--screen-font-map=sfm''__] |
|
|
37 |
[[__''-U''__|__''--old-sfm=sfm.orig''__] |
|
|
38 |
[[__''-k''__|__''--sfm-fallback''__]__ |
|
|
39 |
!!DESCRIPTION |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
The __consolechars__ command loads a font into the |
|
|
43 |
EGA/VGA character generator, and optionally outputs the |
|
|
44 |
previous font. This command reads an 8x''H'' font from |
|
|
45 |
the file and loads it into the character generator memory. |
|
|
46 |
Usually the font size ''H'' will be read from the file, |
|
|
47 |
but some file-formats do not contain enough information for |
|
|
48 |
this, especially the ''raw'' file format, which only |
|
|
49 |
contains the font bitmaps. In this case, H will be computed |
|
|
50 |
from the file size, which implies these files cannot be |
|
|
51 |
compressed. If the input file has codepage format, |
|
|
52 |
containing the three fonts 8x8, 8x14 and 8x16, one of the |
|
|
53 |
options ''-H 8'', ''-H 14'' or ''-H 16'' must be |
|
|
54 |
used to select one. Codepage format is also recognized by |
|
|
55 |
size, and cannot be compressed. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
As currently there is no mode switching support in the Linux |
|
|
59 |
kernel, __consolechars__ has nothing to do with the |
|
|
60 |
current EGA/VGA mode. It's totally user's responsibility to |
|
|
61 |
choose a font matching the current video mode. |
|
|
62 |
!!OPTIONS |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
''-h --help'' |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
Display a short help message and exit. |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
''-V --version'' |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
Display version-number and exit. |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
''-v --verbose'' |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
Display on ''stderr'' informations on what's going |
|
|
81 |
on. |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
''-n --no_act'' |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
Do not change the console state; do not write anything to |
|
|
88 |
any file. Implies ''--verbose''. |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
''-1 --g1'' |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
Activate the G1 charset instead of G0 (see |
|
|
95 |
''--acm''). |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
''--tty=device'' |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
Use ''device'' as console device for ioctls, instead of |
|
|
102 |
guessing which one to use, which usually chooses the current |
|
|
103 |
tty. This can be useful for testing when under X, in |
|
|
104 |
conjunction with ''--no-act'' - actual ioctls are refused |
|
|
105 |
for some reason then. |
|
|
106 |
!!COMMANDS |
|
|
107 |
|
|
|
108 |
|
|
|
109 |
''-f --font=file'' |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
The ''font file'' is a file containing the |
|
|
113 |
bitmap-description (glyph) of characters. Since fonts may |
|
|
114 |
contain the glyphs for arbitrary character-sets, knowledge |
|
|
115 |
about these characters may come either in the font-file (eg. |
|
|
116 |
in PSF files), or in separate screen-font-map files (see |
|
|
117 |
''--sfm'' option). |
|
|
118 |
|
|
|
119 |
|
|
|
120 |
Font-files can be compressed with gzip(1) or |
|
|
121 |
compress(1), with the exception of ''raw'' and |
|
|
122 |
''codepage'' file-formats. |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
Raw font files are binary files of size 256*''H'' bytes, |
|
|
126 |
containing bit images for each of 256 characters, one byte |
|
|
127 |
per scan line, and ''H'' bytes per character (0 |
|
|
128 |
''H'' ''H'' is computed from the file-size, |
|
|
129 |
thus raw font files cannot be compressed. The other |
|
|
130 |
font-formats are described elsewhere. |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
''-d --default-font'' |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
Load a default font. The ''-H'' option can be given to |
|
|
137 |
force a given char-height. |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
''-m --acm --app-charset-map=file'' |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
Load a user-defined ''Application-Charset Map (ACM)'' - |
|
|
144 |
save current ACM. |
|
|
145 |
The mapping from 8-bit characters sent to the screen into |
|
|
146 |
Unicode (UCS2) characters by the running application is |
|
|
147 |
described by an ACM (formerly called ''screen map''). |
|
|
148 |
This map characterizes the 8-bit encoding used by the |
|
|
149 |
application, hence its new name. If no ACM is provided using |
|
|
150 |
the ''--acm'' option, the ''trivial'' map is assumed. |
|
|
151 |
Unless the ''--g1'' option in specified, the __G0__ |
|
|
152 |
charset is then selected, and set to use the ACM just |
|
|
153 |
loaded. If ''--g1'' is specified, the __G1__ charset |
|
|
154 |
is used instead of G0. |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
There are 2 types of ACM's recognized by the ''--acm'' |
|
|
158 |
option, which can be fed in binary or ASCII form. Binary |
|
|
159 |
maps are checked by size, and contain an array of 256 bytes |
|
|
160 |
(old style 8-bit to font-position maps) or 256 unicodes |
|
|
161 |
(8-bit to UCS2 maps). Because of this check, you should not |
|
|
162 |
compress or pipe them. |
|
|
163 |
In the ASCII format, new style (UCS2) ACM's are composed of |
|
|
164 |
lines of the form ''`byte unicode''' where each first |
|
|
165 |
byte is the one to map (from the Application-Charset), in |
|
|
166 |
either of the C decimal, octal, hex, or character syntaxes |
|
|
167 |
for integers, and the unicode is formed either with the `U+' |
|
|
168 |
prefix and 4 hex digits, or with an ''UTF8-encoded |
|
|
169 |
character'' enclosed between single quotes; unspecified |
|
|
170 |
mappings default to ASCII (identity) for characters in the |
|
|
171 |
range 0-127, and to 0xFFFD (the replacement character) for |
|
|
172 |
those in the range 128-255. |
|
|
173 |
Old style (8-bit) maps in the ASCII format are composed of |
|
|
174 |
lines of the form ''`byte byte''' where the first byte |
|
|
175 |
has the same meaning as above, and the second one is the |
|
|
176 |
position in the font; unspecified mappings default to |
|
|
177 |
straight-to-font identity mapping. |
|
|
178 |
An old-style mapping is equivalent to a new-style mapping |
|
|
179 |
where the second byte ''b'' would be replaced by the |
|
|
180 |
unicode __U+F000 |__ ''b'', ie. in the |
|
|
181 |
''straight-to-font zone''. However, due to the |
|
|
182 |
differences of defaults regarding unspecified mappings, just |
|
|
183 |
converting each mapping individually will not be sufficient |
|
|
184 |
to get an equivalent ACM. |
|
|
185 |
|
|
|
186 |
|
|
|
187 |
''-M --old-acm=file'' |
|
|
188 |
|
|
|
189 |
|
|
|
190 |
Saves the previous ACM can be saved to a file. |
|
|
191 |
|
|
|
192 |
|
|
|
193 |
''-u --sfm --screen-font-map=file'' |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
Load a ''Screen Font Map (SFM)'' |
|
|
197 |
The correspondance between Unicode values and the glyphs in |
|
|
198 |
the curent console-font is described by a ''Screen-Font |
|
|
199 |
Map'' (formerly called ''Unicode mapping table''). Some |
|
|
200 |
fonts have a SFM included in the font file, and an explicit |
|
|
201 |
one can be indicated using the ''--sfm'' option. |
|
|
202 |
__consolechars__ will load such a builtin SFM, unless a |
|
|
203 |
''--force-no-sfm'' option is given. One may add a SFM to |
|
|
204 |
a psf font using psfaddtable(1). |
|
|
205 |
|
|
|
206 |
|
|
|
207 |
''--force-no-sfm'' |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
Prevent the loading of a SFM when loading a font containing |
|
|
211 |
one. You should use this option with care, as you probably |
|
|
212 |
don't want to have a font without a SFM; it could cause |
|
|
213 |
trouble. |
|
|
214 |
|
|
|
215 |
|
|
|
216 |
''-U --old-sfm=file'' |
|
|
217 |
|
|
|
218 |
|
|
|
219 |
Save current SFM into a file. |
|
|
220 |
|
|
|
221 |
|
|
|
222 |
''-k --sfm-fallback=file'' |
|
|
223 |
|
|
|
224 |
|
|
|
225 |
Use the given ''file'' as a SFM fallback table, to |
|
|
226 |
supplement the SFM. Multiple ''-k'' options may be |
|
|
227 |
given. |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
A fallback table tells, for some UCS2 characters you're |
|
|
231 |
interested to display, which character's glyph it may use if |
|
|
232 |
its own is not available according to the SFM in |
|
|
233 |
use. |
|
|
234 |
|
|
|
235 |
|
|
|
236 |
If a SFM was to be loaded, fallback mappings are added to |
|
|
237 |
this map before it is loaded. If there was not (ie. no |
|
|
238 |
''--sfm'' option was given, and a font without SFM was |
|
|
239 |
loaded, or the ''--force-no-sfm'' option was given), then |
|
|
240 |
the current SFM is requested from the kernel, the the |
|
|
241 |
fallback mappings are added, and the resulting SFM is |
|
|
242 |
loaded. |
|
|
243 |
|
|
|
244 |
|
|
|
245 |
''-F --old-font=file'' |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
Save old font in the prefered format. It is currently the |
|
|
249 |
same as using --old-font-psf-with-sfm, but may change when a |
|
|
250 |
better format is supported. |
|
|
251 |
|
|
|
252 |
|
|
|
253 |
''--old-font-psf-with-sfm=file'' |
|
|
254 |
|
|
|
255 |
|
|
|
256 |
Save old font in PSF format, with corresponding SFM (PSF |
|
|
257 |
mode 2 or 3). |
|
|
258 |
|
|
|
259 |
|
|
|
260 |
''--old-font-psf=file'' |
|
|
261 |
|
|
|
262 |
|
|
|
263 |
Save old font in PSF format (PSF mode 0 or 1). Usually a bad |
|
|
264 |
idea. |
|
|
265 |
|
|
|
266 |
|
|
|
267 |
''--old-font-raw=file'' |
|
|
268 |
|
|
|
269 |
|
|
|
270 |
Save old font in RAW format. Usually an even worse |
|
|
271 |
idea. |
|
|
272 |
|
|
|
273 |
|
|
|
274 |
''-H --char-height=N'' |
|
|
275 |
|
|
|
276 |
|
|
|
277 |
When loading a font from a codepage file, or a default font, |
|
|
278 |
specify which font-size to use. ''N'' should be a number |
|
|
279 |
between 1 and 31. |
|
|
280 |
!!HISTORY |
|
|
281 |
|
|
|
282 |
|
|
|
283 |
__consolechars__ was originally called setfont(8), |
|
|
284 |
but was renamed (in version 1997.10.28 of the Linux Console |
|
|
285 |
Tools) to allow for changing the command-line options while |
|
|
286 |
providing backward compatibility with the old `kbd' |
|
|
287 |
package. |
|
|
288 |
!!FILES |
|
|
289 |
|
|
|
290 |
|
|
|
291 |
''/usr/share/consolefonts/'' is the default directory for |
|
|
292 |
fonts. |
|
|
293 |
|
|
|
294 |
|
|
|
295 |
''/usr/share/consoletrans/'' is the default directory for |
|
|
296 |
both ACM's and SFM's. |
|
|
297 |
!!BUGS |
|
|
298 |
|
|
|
299 |
|
|
|
300 |
For implementation reasons, binary ACM's and ASCII 8-bit |
|
|
301 |
ACM's cannot be compressed nor piped. This is not likely to |
|
|
302 |
change (except if a good reason is given to the maintainer, |
|
|
303 |
or a patch is submitted), because I consider these formats |
|
|
304 |
to be obsolete. |
|
|
305 |
!!AUTHORS |
|
|
306 |
|
|
|
307 |
|
|
|
308 |
Eugene G. Crosser |
|
|
309 |
Andries E. Brouwer |
|
|
310 |
Extended by Yann Dirson |
|
|
311 |
!!SEE ALSO |
|
|
312 |
|
|
|
313 |
|
|
|
314 |
psfaddtable(1), psfstriptable(1). |
|
|
315 |
---- |