Virtual Console Font Size

I have always been a fervent command line user, preferring to do things like file management, text editing and many other tasks on the command line. Despite this I haven’t used the Linux virtual consoles much, largely because I’m lazy and it used to take a bit of effort to get a decent resolution on them (anything but 1280×800 looks ugly on my laptop and VESA doesn’t support that resolution). But that changed with Ubuntu 9.10 (“Karmic Koala”). In 9.10, kernel modesetting (KMS) is enabled by default and since the early alphas the virtual consoles have automatically started in 1280×800 resolution on my laptop.

Since then I have slowly shifted from using urxvt (my favourite X terminal emulator) to using the virtual consoles. Conceptually there’s not much difference between using a full screen terminal window or a VC, but somehow I just feel more comfortable with the VCs. Perhaps it’s the fact that there are (by default) six VCs, while I’d have to use six virtual desktops to get the same effect under X; or the fact that I don’t need to start X at all to use the VCs (which is kind of awesome!); or perhaps there’s some other reason I can’t figure out.

The default 8×16 font gives a nice 160×50 character console, which is enough for two 80-character “regions” side-by-side (using the vertical split function of screen — unfortunately the screen from Ubuntu repositories insists on putting an ugly bar between the regions and there doesn’t seem to be a way to get rid of it):

The default font is too thick for my taste, but fortunately it’s easy to change. In Ubuntu, you can either use the setfont command (give the font name as a parameter) to try the fonts out, or edit /etc/default/console-setup to set it permanently (takes effect on next reboot). You can find a list of available fonts from /usr/share/consolefonts/; the first part of the filename describes the codeset and you don’t need to include the filename extension (.psf.gz).

For example: setfont Lat15-Terminus16 sets the 8×16 Terminus font with Latin-15 codeset. The number at the end of the font name describes the height of the font.

But why not also switch to a smaller font? 160×50 characters is nice, but more wont hurt (as long as you can still read the text!). Here’s Terminus14 font, which gives a 160×57 console:

Still easily readable. There’s also a 6×12 Terminus font (for huge 213×66 character console), but I’m not sure if I have use for those extra characters:

I’m not quite settled on which one to use, but the nice thing about the virtual consoles is that they can each have different font size. With the setfont command you can have one VC with 6×12 font (e.g. for editing Java code with long lines), another one with 8×14 font (for editing C code), or you can even use a huge 16×32 font if your eyes are tired – although taking a break from computer usage might be the best option in that case.

Ninguno
Fuente: inanebits.wordpress.com