Xft support for GNU Emacs

From Gentoo Wiki
Jump to: navigation, search

Enabling antialiased fonts for Emacs

Installation and setup

Font anti-aliasing using the Xft library and FreeType fonts is available with Emacs 23 or later.

First, set the appropriate USE flags – you must have the xft flag.

root # echo "app-editors/emacs xft" >> /etc/portage/package.use

Now it's time to install Emacs:

root # emerge --ask app-editors/emacs

You can now use XFT fonts in emacs; try emerging media-fonts/ttf-bitstream-vera first.

user $ emacs --font 'Bitstream Vera Sans Mono-12'

If you're happy with this as your default font, set it in your ~/.Xresources:

user $ echo "Emacs.font: Bitstream Vera Sans Mono-12" >> ~/.Xresources
user $
xrdb -merge ~/.Xresources


For more details on Emacs with XFT pretty fonts, see:


We would like to thank the following authors and editors for their contributions to this guide:

  • Thomas Nichols