Thursday, 28 April 2011

Emacs and its fonts

Listening to:

Schutz, Sinfonia Sacrae, op. 6, no. 8: Adjuro vos Filiae Jerusalem

Emacs has terrible font handling: there seem to be about three different APIs, and the documentation doesn’t seem to be as clear as it might about which to use. Then there is the additional confusion to do with fonts on X. There are old style fonts that are specified like

  -foo-bar-medium-104-42-*-wooble-*-*-*-

and then there are GTK font specifications like

  Deja Vu Sans Mono 

sometimes with additional -12 type suffixes.

It’s all terribly confusing. I recently found myself unable to set my font to one that was narrow enough to allow two Emacs windows across one 1280 pixel wide monitor. I posted to Stack Overflow about it, but nobody has come to my aid just yet.

In the meantime, I have adopted a 9pt Lucida Typewriter Sans that looks OK. This does produce a pretty narrow Emacs window, and when I switch to xmonad, I’ll be able to have two such windows tiling nicely beside each other.