Nice Fonts for Emacs

This was originally posted on my family blog on 12/18/06. I will be slowly moving the geeky stuff from there to this blog.

If you use emacs on windows you have seen how nice it can look, especially if you used the cool windows emacs installer (go with the patched version). Today the emacs wiki lead me down the path of nice looking fonts on Linux. I added these lines to my /etc/apt/sources.list:

deb http://debs.peadrop.com edgy backports
deb-src http://debs.peadrop.com edgy backports

Then I imported the gpg key:

wget http://debs.peadrop.com/DD385D79.gpg -O- | sudo apt-key add -

And then installed emacs-snapshot-gtk1:

sudo aptitude update
sudo aptitude install emacs-snapshot-gtk

Then I changed my default-font, like so:

(set-default-font "Bitstream Vera Sans Mono-12")

And now I start emacs like so:

emacs-snapshot-gtk --enable-font-backend

Wow, it looks really good. This gets you a pretty recent build from the emacs cvs repository, so there are some bugs. I’ve seen ediff really wig out, but overall it hasn’t been bad at all.

Footnotes

1 I was already running emacs-snapshot-gtk actually, so I only had to do an aptitude upgrade after the update.

References:

http://g33k.wordpress.com/2006/11/06/gnu-emacs-with-xft-goodness/
http://debs.peadrop.com/dists/edgy/backports/

Comments

Anonymous said…
In the blog post where he explains how to use it, you'll see that he has compiled it so that "--enable-font-backend" is not necessary, and that the font can also be specified with "--font "Bitstream Vera Sans Mono-12" at the commandline, or by putting "Emacs.font: Bitstream Vera Sans Mono-12" in your ~/.Xresources (and xrdb -merge it).
I don't know much about how thing work, but I'm guessing that it might be slightly faster for X to set the font in the first place instead of loading Emacs with some other font which gets changed when set-default-font is encountered.
Bryan said…
That blog entry hadn't been written when I looked into this back in December. Thanks for the update!

Popular posts from this blog

SystemVerilog Fork Disable "Gotchas"

'git revert' Is Not Equivalent To 'svn revert'

SystemVerilog Streaming Operator: Knowing Right from Left