How do I change Emacs' default font size and font type?

Solution 1:

You can also do the following in your .emacs file.

Emacs 23.1

(set-frame-font "Inconsolata 12" nil t)

Older versions of Emacs

(set-default-font "Inconsolata 12" nil t)

Solution 2:

You can use the menu bar. Go to Options->Set Default Font....

After you choose a font, don't forget to press Options->Save Options—otherwise your new font will not be saved after you close Emacs.

Solution 3:

To get an extended list of customization use

M-x customize-face RET

Solution 4:

I have the below setting in init.el:

(set-face-attribute 'default nil :font "Menlo" :height 160)

Note: If you have a preset for window size (width and height), the height attribute of the font is going to interfere with that layout.