
1.	Restoring corrupted textmode fonts.

If XFree86 corrupts your textmode font, try putting restorefont
in your path and using the shell script runx to run X. runx saves
the VGA font data in /tmp/fontdata, and restores it when you exit X.

Note that this doesn't help with syncing problems.

A more rigorous alternative is to run the 'savetextmode' script before
running X, and 'textmode' after. This will restore the textmode registers
and the VGA palette in addition to the VGA font.


2.	Changing the textmode font.

The VGA font format:

offset
0-31		character 0
...		...
8164-8195	character 255

Each row of a character bitmap is stored as a byte (8 pixels).
The space that is left from the 32-byte buffer for each character
is ignored, e.g. a 16-line font uses only offsets 0-15 of each character.

Linux text resolutions:

80x25		16 line font	400 scanlines
80x28		14 line font	400 scanlines
80x50		8 line font	400 scanlines

The font sizes and resolutions of extended textmodes depend on the
video card type and BIOS:

132x25		14 line font	350 scanlines (ugly)
132x25		16 line font	400 scanlines
132x43		8 line font	350 scanlines (use fix132x43 to fix/improve)
132x50		8 line font	400 scanlines

To load a font into video memory, use

	restorefont -r fontname

Using a font that has less lines per character than the textmode works, but
the characters are smaller. Using a font that is bigger than the textmode
font results in the bottom part of characters being cut off.

I've included sample fonts with 8, 14 and 16 line characters.

The convfont program can be used to convert fonts straightforwardly stored 
character-after-character (i.e. each character only uses 8/14/whatever
bytes), to the 32-byte per character format that restorefont requires.


References

The national/fontpak packages, which include kernel patches, allow different
textmode fonts to be used in different virtual consoles. These have been
superseded by the kbd package (in the kernel since pl15).
