I tried following the advice gathered from Google searches but I am not able to get it to work. My ~/.emacs.el
file contains the following:
;; Set color scheme
(require 'color-theme)
(load-file "/home/manoj/Dropbox/conf/themes/color-theme-chocolate-rain.el")
(color-theme-chocolate-rain)
;; Set font
;; (set-default-font "-unknown-Inconsolata-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1")
;; Insert four spaces on tab
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq indent-line-function 'insert-tab)
I've commented out the font configuration line as it doesn't work. I'm using GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of 2009-09-27 on palmer, modified by Debian on Ubuntu Karmic.
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.
By default, Emacs displays text on graphical displays using a 10-point monospace font, and the font size can be changed interactively (see Text Scale).
For a given character, you can find out which font was used by moving point to that character than then doing C-u C-x = which will give you all kinds of information about that position in the buffer, including which font was used for it.
Another way is to use the key sequence "SPC z x" and then press "+/=" key to increase font size or "-" key to decrease font size. Other options are shown on the which-key menu. This effects only the present buffer. By the way, you can customize the step size via the variable text-scale-mode-step .
Judging from the emacs version, it appears you've installed emacs-snapshot
(good).
So this should work:
sudo apt-get install ttf-inconsolata
Then put in your ~/.emacs file something like
(set-frame-font "Inconsolata-12")
(The 12 refers to the font size, and can be changed.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With