.TH CONSOLECHARS 8 "31 Oct 1997" "Console tools" "Linux User's Manual" .SH NAME consolechars - load EGA/VGA console screen font, screen-font map, and/or application-charset map. .SH SYNOPSIS .B consolechars .BI [ -v | --verbose "] [" -V | --version "] [" -h | --help "] [" -1 | --g1 ] .BI [ -n | --no-act "] [" --force-no-sfm "] [" -H | --char-height=N ] .BI [ --tty=device ] .BI [ -m | --acm= | --app-charset-map=acm "] [" -M | --old-acm=acm.orig ] .BI [ -f | --font=font.new "] [" -F | --old-font=font.orig ] .BI [ --old-font-raw=font.orig "] [" --old-font-psf-with-sfm=font.orig.psf ] .BI [ --old-font-psf=font.orig.psf ] .BI [ -u | --sfm= | --screen-font-map=sfm "] [" -U | --old-sfm=sfm.orig ] .BI [ -k | --sfm-fallback ] .SH DESCRIPTION .IX "consolechars command" "" "\fLconsolechars\fR command" The .B consolechars command loads a font into the EGA/VGA character generator, and optionally outputs the previous font. This command reads an .RI 8x H font from the file and loads it into the character generator memory. Usually the font size .I H will be read from the file, but some file-formats do not contain enough information for this, especially the .I raw file format, which only contains the font bitmaps. In this case, H will be computed from the file size, which implies these files cannot be compressed. If the input file has codepage format, containing the three fonts 8x8, 8x14 and 8x16, one of the options .IR "-H 8" ", " "-H 14" " or " "-H 16" must be used to select one. Codepage format is also recognized by size, and cannot be compressed. As currently there is no mode switching support in the Linux kernel, .B consolechars has nothing to do with the current EGA/VGA mode. It's totally user's responsibility to choose a font matching the current video mode. .SH OPTIONS .TP .I -h --help Display a short help message and exit. .TP .I -V --version Display version-number and exit. .TP .I -v --verbose Display on .I stderr informations on what's going on. .TP .I -n --no_act Do not change the console state; do not write anything to any file. Implies .IR --verbose . .TP .I -1 --g1 Activate the G1 charset instead of G0 (see .IR --acm ). .TP .I --tty=device Use .I device as console device for ioctls, instead of guessing which one to use, which usually chooses the current tty. This can be useful for testing when under X, in conjunction with .I --no-act \- actual ioctls are refused for some reason then. .SH COMMANDS .TP .I -f --font=file The .I font file is a file containing the bitmap-description (glyph) of characters. Since fonts may contain the glyphs for arbitrary character-sets, knowledge about these characters may come either in the font-file (eg. in PSF files), or in separate screen-font-map files (see .I --sfm option). Font-files can be compressed with .BR gzip "(1) or " compress (1), with the exception of .IR raw " and " codepage file-formats. Raw font files are binary files of size .RI 256* H bytes, containing bit images for each of 256 characters, one byte per scan line, and .I H bytes per character (0 < .I H <= 32); .I H is computed from the file-size, thus raw font files cannot be compressed. The other font-formats are described elsewhere. .TP .I -d --default-font Load a default font. The .I -H option can be given to force a given char-height. .TP .I -m --acm --app-charset-map=file Load a user-defined .I Application-Charset Map (ACM) - save current ACM. .br The mapping from 8-bit characters sent to the screen into Unicode (UCS2) characters by the running application is described by an ACM (formerly called .IR "screen map" ). This map characterizes the 8-bit encoding used by the application, hence its new name. If no ACM is provided using the .I --acm option, the .I trivial map is assumed. Unless the .I --g1 option in specified, the .B G0 charset is then selected, and set to use the ACM just loaded. If .I --g1 is specified, the .B G1 charset is used instead of G0. There are 2 types of ACM's recognized by the .I --acm option, which can be fed in binary or ASCII form. Binary maps are checked by size, and contain an array of 256 bytes (old style 8-bit to font-position maps) or 256 unicodes (8-bit to UCS2 maps). Because of this check, you should not compress or pipe them. .br In the ASCII format, new style (UCS2) ACM's are composed of lines of the form .I `byte unicode' where each first byte is the one to map (from the Application-Charset), in either of the C decimal, octal, hex, or character syntaxes for integers, and the unicode is formed either with the `U+' prefix and 4 hex digits, or with an .I UTF8-encoded character enclosed between single quotes; unspecified mappings default to ASCII (identity) for characters in the range 0-127, and to 0xFFFD (the replacement character) for those in the range 128-255. .br Old style (8-bit) maps in the ASCII format are composed of lines of the form .I `byte byte' where the first byte has the same meaning as above, and the second one is the position in the font; unspecified mappings default to straight-to-font identity mapping. .br An old-style mapping is equivalent to a new-style mapping where the second byte .I b would be replaced by the unicode .B U+F000 | .IR b , ie. in the .IR "straight-to-font zone" . However, due to the differences of defaults regarding unspecified mappings, just converting each mapping individually will not be sufficient to get an equivalent ACM. .TP .I -M --old-acm=file Saves the previous ACM can be saved to a file. .TP .I -u --sfm --screen-font-map=file Load a .I Screen Font Map (SFM) .br The correspondance between Unicode values and the glyphs in the curent console-font is described by a .I Screen-Font Map (formerly called .IR "Unicode mapping table" ). Some fonts have a SFM included in the font file, and an explicit one can be indicated using the .I --sfm option. .B consolechars will load such a builtin SFM, unless a .I --force-no-sfm option is given. One may add a SFM to a psf font using .IR psfaddtable (1). .TP .I --force-no-sfm Prevent the loading of a SFM when loading a font containing one. You should use this option with care, as you probably don't want to have a font without a SFM; it could cause trouble. .TP .I -U --old-sfm=file Save current SFM into a file. .TP .I -k --sfm-fallback=file Use the given .I file as a SFM fallback table, to supplement the SFM. Multiple .I -k options may be given. A fallback table tells, for some UCS2 characters you're interested to display, which character's glyph it may use if its own is not available according to the SFM in use. If a SFM was to be loaded, fallback mappings are added to this map before it is loaded. If there was not (ie. no .I --sfm option was given, and a font without SFM was loaded, or the .I --force-no-sfm option was given), then the current SFM is requested from the kernel, the the fallback mappings are added, and the resulting SFM is loaded. .TP .I -F --old-font=file Save old font in the prefered format. It is currently the same as using --old-font-psf-with-sfm, but may change when a better format is supported. .TP .I --old-font-psf-with-sfm=file Save old font in PSF format, with corresponding SFM (PSF mode 2 or 3). .TP .I --old-font-psf=file Save old font in PSF format (PSF mode 0 or 1). Usually a bad idea. .TP .I --old-font-raw=file Save old font in RAW format. Usually an even worse idea. .TP .I -H --char-height=N When loading a font from a codepage file, or a default font, specify which font-size to use. .I N should be a number between 1 and 31. .SH HISTORY .B consolechars was originally called .BR setfont (8), but was renamed (in version 1997.10.28 of the Linux Console Tools) to allow for changing the command-line options while providing backward compatibility with the old `kbd' package. .SH FILES .I @datadir@/consolefonts/ is the default directory for fonts. .I @datadir@/consoletrans/ is the default directory for both ACM's and SFM's. .SH BUGS For implementation reasons, binary ACM's and ASCII 8-bit ACM's cannot be compressed nor piped. This is not likely to change (except if a good reason is given to the maintainer, or a patch is submitted), because I consider these formats to be obsolete. .SH AUTHORS Eugene G. Crosser .br Andries E. Brouwer .br Extended by Yann Dirson .SH "SEE ALSO" .BR psfaddtable (1), .BR psfstriptable (1).