Using SF Mono in Emacs

I love the SF Mono font that comes with macOS Sierra, but couldn’t find it in the font selection dialog in Emacs. Turns out, it’s embedded inside the bundle and thus not available to other apps. That’s easily remedied. From terminal run:

$ open /Applications/Utilities/

Select all files in this folder (Cmd+A), right-click any of the selected files and select Open. This will bring up the font preview dialog in Font Book. Click the Install Font button.

This will bring up another dialog saying that “Problems may have been found with some fonts during validation.” I find this copy in a computer program unacceptable. There are problems here or there are not. Anyway, since Font Book isn’t all that sure about the status of this font, we’ll go ahead and press on with the install. Check the Select all fonts checkbox and click the Install Checked button.

The font should now be available in the font selection dialog of any application. To use this in Emacs, simply add this to your .emacs and restart it.

(set-face-attribute ‘default nil :font “SF Mono-12”)