I’ve always felt a little bad that I have a hard time understanding how to work with Emacs fonts. Even simple things like setting the default font seems harder than it should be. It turns out that it’s not (just) because I’m slow: the font system really is hard to understand.

At least that’s what Alan Third says. He’s got a really useful article on how to work with the font system so you can do common things like configuring a backup font. That’s important if your default font doesn’t include the Unicode symbols that you use. For example, my default font, Inconsolata, is missing many of the Unicode symbols that I use so I had to download and configure the Symbola font to supply the missing glyphs. Third says that Emacs has an automatic fallback to Symbola so it may not be necessary to configure it. See what I mean about not understanding the font system? If, like Third, you need support for several Asian languages, you’ll appreciate his section on how to set things up to support the various fonts.

It turns out that Emacs will try really hard to find a glyph that matches the symbol you’re trying to use so in theory you really just need to make sure they’re on your machine. But that means Emacs has to search all the fonts you have installed so you’re better off configuring your fallback fonts so Emacs can limit its search space. On the other hand, if you’re using your configuration on a machine that doesn’t have that particular font installed, Emacs will just put an empty space in its place. Fortunately, Third shows you to get around that problem too.

The information in his post isn’t the type of thing you need everyday—or even often—but when you need to do something with fonts, it’s invaluable. It’s definitely worth bookmarking the post for when that day comes.

Update : your → you’re