Friday, January 14, 2011

How to fix Emacs 23 Huge ungly font on Lucid

Since I've upgraded to Ubuntu 10.04 (Lucid) Emacs 23 now has beautiful antialiased fonts, but I like the old bitmaped X11 "fixed" font. I do use a .Xresources file to setup emacs default font.

This is my emacs section at .Xresources
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! emacs, xemacs

!emacs*Background: DarkSlateGray
emacs*Background: Black
!!!emacs*Foreground: Wheat
emacs*Foreground: White
emacs*pointerColor: Red
emacs*cursorColor: Red
emacs*bitmapIcon: on
emacs*font: fixed
!!!emacs*font: 9x15bold
!!emacs*geometry: 100x40+20+20

But for my surprise using this setup emacs launches with a ugly huge serif font.

I tried to launch emacs with -fn fixed but the ugly font did still there.

So I checked at my /etc/X11/fonts/misc/xfonts-base.alias, which is the file where fixed font is declared. And it was there:
fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
And which had called my attention, was that 6x13 font alias had the same properties as the fixed:
6x13 -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1

So launching emacs with -fn 6x13 gave me back the look and feel I wanted. After that I changed my .Xresources to use 6x13 instead of fixed. And it is done.

I don't know what was done with emacs but this little work around fix the Huge Ugly font issue which I had see while I was googling arround on that subject.

No comments:

Post a Comment