jump to navigation

Acceptable fonts in Emacs February 8, 2006

Posted by kochhar in emacs, ubuntu.
trackback

As much as I love emacs, for some reason the fonts looked terrible. I believe this is because emacs doesn’t use the X font rendering libraries so even beautiful fonts like bitstream vera look terrible. I couldn’t find an acceptable substitute so I just endured the pain. Now, thankfully I have a solution. Not a perfect solution but very workable.

We have two options both of which require some sacrifice. The first gives us a nicely rendered font but at the expense of colors which might be useful for syntax highlighting purposes. The second keeps the colors, but we have to give up bitstream vera as the font. This in my opinion is the lesser of the evils, since the substitute is very acceptable.

So here goes, method 1. Run emacs in terminal mode. Especially if you’re running the gnome-terminal the fonts will look great. But you will have to give up colors and nice mouse support. I don’t much use the mouse in emacs, a result of using it remotely in a terminal for many years, but if you do you might suffer a little. Emacs does have a xterm compatabiliy mouse mode, but it’s not that great. So how do we accomplish these tasks?

To run emacs in terminal mode: emacs -nw
You can also add this as a permanent alias, if you’re using bash edit your ~/.bash_aliases file and add in: alias emacs="emacs -nw"

To get the mouse working in xterm: M-x xterm-mouse-mode
Or add to your .emacs : (unless window-system (xterm-mouse-mode 1))

The second method is to edit your font setup. Try M-x customize-face and when prompted for the face to edit, enter default. Once in the customization screen, for the font family enter misc-fixed and a height somewhere between 125 and 150 depending on your screen resolution. I have a resolution of 1400×1050 and use a height of 125. Save the font and voila, you are all set. The font is definitely not as nice as bitstream vera, but it is quite acceptable and you don’t give up the mouse and the colors that emacs has available.

Comments»

No comments yet — be the first.

Leave a comment