4

I got an GNU Emacs' problem, it can't work on X11 and crashes with a message "Font `Ubuntu Mono 13' is not defined" but it works fine without X, more Xemacs can run without problem, GNU Emacs is a version 23.2.1 and Xemacs is a [version 21.4.22; August 2010]

I saw the kotnik's post ont the 2011-11-21 22:45:49 and my problem is not related with these ttf-ubuntu-font-family as they are installed and it makes no help then i have no .emacs file and .emacs.d/ folder is empty.

The problem seems to be related with my user's profile cause it works fine with an other user's profile on the same system (the .emacs.d/ folder on that account is the same than mine.

2
  • Try to start emacs with -q and with -Q if the problem goes away with -q it's your fault (your configuration under .emacs or .emacs.d) if the problem goes away with -Q then there is a problem with your system configuration or your X resources (something in .Xresources or /etc/)
    – Daimrod
    Commented Dec 31, 2011 at 11:39
  • I tried this but none of them worked
    – joanluc
    Commented Jan 1, 2012 at 23:12

4 Answers 4

3

Try adding following line into your ~/.Xdefaults file (if not exists create one with touch .Xdefaults):

   emacs.font:Monospace 12.

See man emacs for details.

2

I'm not an emacs expert but check you .emacs file the problem may be the combination of font and size is not supported. The line

(set-default-font "Monospace-12")

is in my .emacs file (in you home/user directory just in case you don't know) if you have no default font set try this one it works fine on my system.

1
  • 1
    Just adding that line (set-default-font "Monospace-12") did'nt worked but that's the good way, i tried also launching emacs with the command : 'emacs -fn "Monospace-12"` and this one worked. Finally, i could anyway create a bashn alias to emacs with it.
    – joanluc
    Commented Jan 2, 2012 at 20:46
2

Not entirely obvious at first: you need to install the font file you get from font.ubuntu.com on the machine on which you are running emacs, not as I would have thought, on the machine where the Xserver is. I ran into this running emacs via ssh.

mkdir -p ~/.fonts
cd ~/.fonts
wget http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip
unzip ubuntu-font-family-0.80.zip
fc-cache -f

It is a really nice looking font. I never figured out where the setting was, but once I had emacs started, was able to change it.

1

The problem seems to stem from a users home directory that had been run under Ubuntu 11.10 or higher that set the gconf setting for /desktop/gnome/interface/monospace_font_name to Ubuntu Mono 13. Setting this to something that is available fixes the issue.

gconftool-2 -g /desktop/gnome/interface/monospace_font_name
Ubuntu Mono 13

Set it to Monospace-12 or whatever you would like:

gconftool-2 -t string -s /desktop/gnome/interface/monospace_font_name
Monospace-12

gconftool-2 -g /desktop/gnome/interface/monospace_font_name
Monospace-12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .