Gentoo Logo

Using Emacs XFT Support

1.  Enabling Antialiased Fonts for Emacs

Installation and setup

Note: 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.

Code Listing 1.1: Adding appropriate USE flags

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

Now it's time to install Emacs:

Code Listing 1.2: Emerging emacs

# emerge -av app-editors/emacs

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

Code Listing 1.3: Enabling XFT fonts in emacs

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

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

Code Listing 1.4: Setting the default font for emacs startup

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

Resources

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



Print

Page updated August 24, 2012

Summary: This document shows you how to enable and use antialiased (pretty) fonts for Emacs.

Thomas Nichols
Author

Ulrich Müller
Author

Joshua Saddler
Editor

Christian Faulhammer
Contributor

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.