1 min read

Nicer Xterm

I usually use the Xterm terminal emulator when I am in mostly vanilla environments or in those cases when I do not want some of the other terminal emulators that one could choose. Xterm is a good, quiet workhorse that does its job well. There are a few things that I do not like about it, but otherwise, it's probably the terminal emulator on which I spend the majority of my time.

However, I have always found the default configuration of fonts with Xterm to be a real pain. They are always too small, and always setup with a color scheme (usually black on white) that just hurts my eyes when too many of them show up in a dimly lit room. Usually I go through a few incantations to get something close to reasonable out there, but until today, I have stuck with the bitmap infrastructure for fonts in Xterm. This means that I have lost out on modern advances in anti-aliasing that can make some of the nicer fonts really nice. Some other fonts just do not look good without anti-aliasing, whereas some really do not want to have you running anti-aliasing on them. Regardless, I always increase the font size of the default setup to match my monitor DPI, and I choose a better font than the default.

Today I finally took a look at the Xft facilities in Xterm, quite accidently. In there, I found that using only the renderFont and fontFace resources, I can get Xterm's fonts to look really great. That is because the renderFont resource controls whether or not Xterm takes advantage of Xft for font rendering. When it does take advantage of it, I get the good default scaling of fonts that actually takes into account how big my monitor DPI is. On the other hand, with fontFace, I can use a simpler font specification than the whole font-spec. For me, having done this so often, I do not get bothered by it much, because it really is not that hard to use the font-spec format, but for others this will come as a welcome way to avoid learning the font-spec format.

All in all, this simple pair of resources was all I needed to get my terminal fonts in order this time around. I am pleased with this.