Setting the Console Font

You can adjust the size and appearance of text by altering the fonts displayed by the video card. Linux provides several tools designed to do this: consolechars, setfont, and fontconfig. Which tools are available depends upon which distribution you're using, as specified in Table 5.5. The first two programs work in a very similar way. Both take a number of options, but you can usually run them by passing a font filename to the command with -f (for consolechars) or-v (for setfont):

$ setfont -v /usr/lib/kbd/consolefonts/t.psf.gz

Table 5.5: Console Font Utility and Font File Locations

Distribution

Font-Setting Utilities

Package Holding Font-Setting Utilities

Package Holding Font Files

Location of Font Files

Debian

consolechars

console-tools

console-data and fonty

/usr/share/consolefonts

Mandrake

consolechars and setfont

console-tools

console-tools

/usr/lib/kbd/consolefonts

Red Hat

setfont

kbd

kbd

/lib/kbd/consolefonts

Slackware

setfont and fontconfig

kbd

kbd

/usr/share/kbd/consolefonts

SuSE

setfont

kbd

kbd

/usr/share/kbd/consolefonts

The fontconfig utility is unique to Slackware. It presents a menu of font choices and enables you to try a font before setting it for your login session. If you want to make the change permanent, fontconfig writes a startup script, /etc/rc.d/rc.font, which calls setfont to do the job every time the system boots. The location of the console font files and the packages from which they're installed vary substantially from one distribution to another, as Table 5.5 shows.

Most console fonts are eight or nine pixels wide and between eight and sixteen pixels high. An 8 x 16 font yields 25 lines of text. You can double the number of lines of text displayed in text mode by switching to an 8 x 8 font, or you can set an intermediate value with a font of another size.

0 0

Post a comment