2

I have installed liberation-fonts package and xfontsel sees its fonts. But emacs not. Why? If possible I would do without X resources file.

(set-default-font "-*-liberation serif-*-*-*-*-17-*-*-*-*-*-*-*")

p.s. I trying it on gentoo.

RomanKovalev
  • 852
  • 3
  • 10
  • 29

2 Answers2

3

You can also try set-default-font, like this:

(set-default-font "Liberation Mono-13")

or

(set-default-font "Liberation Mono-13:bold")

in your .emacs file (the docs for this function advise using set-frame-font instead, but set-default-font still works in Emacs 24).

You might find these links interesting:

Community
  • 1
  • 1
Miron Brezuleanu
  • 2,989
  • 2
  • 22
  • 33
  • 1
    set-default-font: Font `Liberation Mono-13' is not defined. – RomanKovalev Apr 18 '12 at 05:52
  • I'm using Ubuntu, which has this particular font installed by default. You probably need to install the font or use a different font that is present on your system. – Miron Brezuleanu Apr 18 '12 at 06:08
  • It installed on my system and I can see it in xfontsel. But emacs not see... but emacs see terminus-font. wtf? :) – RomanKovalev Apr 18 '12 at 19:50
  • Try shift-left click in an Emacs buffer and select "Change Buffer Font..." from the popup menu. You should see a list of fonts you can select from. Also, make sure you're running Emacs 23 or 24 - I don't remember what works in Emacs 22 or less. – Miron Brezuleanu Apr 19 '12 at 07:32
1

A nice way to set fonts in Emacs is through ~/.Xdefaults:

Emacs.font: Inconsolata:size=16:antialise:true
Emacs.fontBackend: xft
pmr
  • 58,701
  • 10
  • 113
  • 156