Previous: , Up: Alternate character sets   [Contents][Index]

10.4 How do I add fonts for use with Emacs?

First, download and install the BDF font files and any auxiliary packages they need. The GNU Intlfonts distribution can be found on the GNU Software Directory Web site.

Next, if you are on X Window system, issue the following two commands from the shell’s prompt:

  xset +fp /usr/local/share/emacs/fonts
  xset fp rehash

(Modify the first command if you installed the fonts in a directory that is not /usr/local/share/emacs/fonts.) You also need to arrange for these two commands to run whenever you log in, e.g., by adding them to your window-system startup file, such as ~/.xsessionrc or ~/.gnomerc.

Now, add the following line to your ~/.emacs init file:

  (add-to-list 'bdf-directory-list "/usr/share/emacs/fonts/bdf")

(Again, modify the file name if you installed the fonts elsewhere.)

Finally, if you wish to use the installed fonts with ps-print, add the following line to your ~/.emacs:

  (setq ps-multibyte-buffer 'bdf-font-except-latin)

You can now use the Emacs font menu to select the ‘bdf: 16-dot medium’ fontset, or you can select it by setting the default font in your ~/.emacs:

  (set-frame-font "fontset-bdf")