Unicode Font Redux

A couple of days ago I wrote about finally solving a long standing Emacs problem involving missing glyphs in my default font. I was really happy to have the problem resolved. So pleased I wrote about it in glowing terms.

That solution involved installing the unicode-fonts package, which scans your fonts for missing glyphs, finds them in other installed fonts, and arranges for them to be used in place of the missing glyphs. It’s a really great package but it does much more than I need. I really just wanted to specify an alternate font for those missing glyphs.

As soon as I published my post, Xah Lee and Artur Malabarba suggested a simpler solution. I was happy with unicode-fonts but couldn’t resist the one line solution that Lee and Malabarba offered. So I disabled unicode-fonts and added the line

(set-fontset-font "fontset-default" nil 
                  (font-spec :size 20 :name "Symbola"))

to my init.el. It worked perfectly, of course, so I uninstalled unicode-fonts and went with the Lee-Malabarba solution.

Malabarba notes that the documentation for set-fontset-font is a bit opaque. That’s an understatement. I had to read it several times before I could figure out why it worked for my problem. No matter. If you’re having the same problem you can just think of it as a magic incantation.

This entry was posted in General and tagged . Bookmark the permalink.