Yumbrad logo

1.18.10

Emacs / Terminal Misc Fixed font on Mac OS

Filed under: — Bradley @ 5:25 pm

I’ve done this a couple times now, and forgotten what I did, so I’ll blog it this time for me and anyone else. I like the misc-fixed-semicondensed 6×13 font that is the default for xterm in Linux. I eventually got this working well in Mac OS for emacs. Here are the steps:

1. Download and install the MiscFixedSC613 TTF font from http://www.ank.com.ar/fonts/.

2. Add something like the following to your .emacs (this also swaps “command” and “option”, so that meta is next to space, which is how I like it – can still Cmd-V paste from mac clipboard using option key):

(defvar macosx-p  (string-match "darwin" (symbol-name system-type)))
(unless (eq window-system nil)
  (cond (macosx-p
	 (setq default-frame-alist '((width . 110) (height . 89) (top . 22) (left . 0)
				     (background-color . "black")
				     (foreground-color . "#d0e0e9")))
	 (setq mac-option-modifier 'super)
	 (setq mac-command-modifier 'meta)
	 (set-face-font
	  'default "-apple-miscfixedsc613-medium-r-semicondensed--12-100-72-72-m-100-iso10646-1")
	 (setq mac-allow-anti-aliasing nil)))
)

3. Unfortunately, this didn’t really fix anti-aliasing for me – the outlines of my o’s and 8′s were ugly and filled-in, like they’d been flood filled. I also had to do this in terminal:

defaults write org.gnu.Emacs AppleAntiAliasingThreshold 100

Now, everything looked great!

Powered by WordPress