I have the following in my .emacs using Emacs for OSX:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 130 :width normal :family "Inconsolata")))))
Setting the font
It's easiest to set the font using the menus if you're running Emacs in a graphical environment. Use "Options -> Set Default Font..." from the menus.
Now, you're not done because you've only changed the font temporarily. The easiest method that I know of is to use the customization mode.
M-x customize-face RET default RET
Now change the options you wish to change, if any. If you've already changed the font using the menus, you should see your changes here.
Saving to your init file
Save For Future Sessions by either:
- Click on the State button and choose Save For Future Sessions
or
C-x C-s
while in the Customization buffer which will should do the same thing but doesn't always work, e.g. after (set-default-font "Inconsolata")
If all else fails...
You may have luck with the Set Fonts page.
emacs --daemon
and make sure that there are no error messages.init.el
: (set-frame-font "Ubuntu Mono 11")