Messed up fonts in emacs

Bug #53038 reported by Scott Henson
12
Affects Status Importance Assigned to Milestone
emacs21 (Ubuntu)
New
Undecided
Unassigned
xorg (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On a fresh edgy install, emacs font rendering is messed up. I'll attach a screen shot. The wierd part is that on first boot, emacs worked properly. But after I rebooted(for the kernel) it was as shown in the screen shot. It makes emacs unusable. Moving customizations out of the way has no effect.

Revision history for this message
Scott Henson (scotth) wrote :

First Screen shot with the first screen.

Revision history for this message
Scott Henson (scotth) wrote :
Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

I can confirm this, it also happens for me on a machine upgraded from Dapper. It also happens with the emacs-snapshot package.

The emacs fonts were fine in Dapper.

Changed in emacs21:
status: Unconfirmed → Confirmed
Revision history for this message
Dave Love (fx-gnu) wrote :

It's failing to find the font for the default face. On
Dapper, this appears to be
-Adobe-Courier-Medium-R-Normal--17-120-100-100-M-100-ISO8859-1
by default.

(This is actually a poor default. misc-fixed would be
better since it has a decent iso10646-1 repertoire.)

Revision history for this message
Scott Henson (scotth) wrote :

I meant to come back and comment on this. Its due to the font paths in edgy being different from those in dapper. In dapper the fonts are in /usr/share/X11/fonts, while the fonts are in /usr/share/fonts/ (I believe, I am away from my edgy machine). Changing all the font paths and restarting X is good enough to get emacs back. So this should be assigned to xserver-xorg.

Oh, and the reason emacs is affected and the rest of gnome isn't is because gnome uses xft. I can't wait for emacs 22 with xft support.

Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

Yes, changing my xorg.conf to use the FontPath lines below fixes the problem for me.

        FontPath "unix/:7100"
        FontPath "/usr/share/fonts/X11/misc"
        FontPath "/usr/share/fonts/X11/cyrillic"
        FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath "/usr/share/fonts/X11/Type1"
        FontPath "/usr/share/fonts/X11/CID"
        FontPath "/usr/share/fonts/X11/100dpi"
        FontPath "/usr/share/fonts/X11/75dpi"
        FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"

Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

Attempt to change package, emacs21 -> xorg.

Revision history for this message
PaulSchulz (paulschulz) wrote :

I believe that the latest edgy update fixes this problem. I had it, but it now has seemed to have gone away.

Revision history for this message
Dave Love (fx-gnu) wrote :

I'd forgotten commenting on this before I submitted
#64003. That was from a fairly recent upgrade to edgy.
I don't see any relevant fixes, and the related bugs are
still open (surprisingly, since this seems relatively
serious). Can you identify a specific change which fixes
it?

Revision history for this message
PaulSchulz (paulschulz) wrote :

I don't know if the following helps or not, but the following is the diff of my xorg.conf.

- An old one: xorg.conf.200603211710
- Today: xorg.conf

Where the font path has changed for 'misc' fonts only.

Revision history for this message
PaulSchulz (paulschulz) wrote :

The following diff is from the more recent upgrade in edgy.

- Previous: xorg.conf.20060930213730
- Today: xorg.conf

No relevent configuration file changes, as far as I can see, but it might give you an idea of what changed in the upgrade.

In both of these cases, I have taken the default, and auto-detection options from 'dpkg-reconfigure'.

Revision history for this message
Luca Ferretti (elle.uca) wrote :

IMHO the bug is still here. I've changed mu xorg.conf file to use the right directory (/usr/share/fonts/X11/). Now, refreshing xorg.conf file using dpkg-reconfigure, I should have a working file

#### start console log ####

  $ sudo dpkg-reconfigure -phigh xserver-xorg
  xserver-xorg postinst warning: overwriting possibly-customised configuration
     file; backup in /etc/X11/xorg.conf.20061016123838
  $ diff -Naur /etc/X11/xorg.conf.20061016123838 /etc/X11/xorg.conf
--- /etc/X11/xorg.conf.20061016123838 2006-10-16 12:38:38.000000000 +0200
+++ /etc/X11/xorg.conf 2006-10-16 12:38:39.000000000 +0200
@@ -15,13 +15,14 @@
 # sudo dpkg-reconfigure -phigh xserver-xorg

 Section "Files"
+ FontPath "/usr/share/X11/fonts/misc"
+ FontPath "/usr/share/X11/fonts/cyrillic"
+ FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
+ FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
+ FontPath "/usr/share/X11/fonts/Type1"
+ FontPath "/usr/share/X11/fonts/100dpi"
+ FontPath "/usr/share/X11/fonts/75dpi"
        FontPath "/usr/share/fonts/X11/misc"
- FontPath "/usr/share/fonts/X11/cyrillic"
- FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
- FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
- FontPath "/usr/share/fonts/X11/Type1"
- FontPath "/usr/share/fonts/X11/100dpi"
- FontPath "/usr/share/fonts/X11/75dpi"
        # path to defoma fonts
        FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
  $ ls /usr/share/X11/fonts/75dpi
encodings.dir fonts.alias fonts.cache-1 fonts.dir

#### end console log ####

So, currently:
  1. font files are installed in /usr/share/fonts/X11/* directories
  2. the dpkg-reconfigure command (it should recreate xorg.conf file as in a fresh install, removing all manual customizations, isn't it?) sets FontPaths to non working directories (no font files in /usr/share/X11/fonts/*)

Revision history for this message
Dave Love (fx-gnu) wrote : [Bug 53038] Re: Messed up fonts in emacs

I supplied a fix under #63408 (which has this one marked as a
duplicate) and gave it a better title. I hope a maintainer
will now fix it.

Revision history for this message
Brian Murray (brian-murray) wrote : xorg.conf validation failed

The xorg.conf at http://launchpadlibrarian.net/4845704/xorg.conf-ps1.diff and attached to this bug is problematic for the following reason:
An EndSection is in the wrong place.

Revision history for this message
Brian Murray (brian-murray) wrote :

The xorg.conf at http://launchpadlibrarian.net/4845709/xorg.conf-ps2.diff and attached to this bug is problematic for the following reason:
An EndSection is in the wrong place.

Revision history for this message
Brian Murray (brian-murray) wrote :

The xorg.conf at http://launchpadlibrarian.net/4845704/xorg.conf-ps1.diff and attached to this bug is problematic for the following reason:
An EndSection is in the wrong place.

Revision history for this message
Brian Murray (brian-murray) wrote :

The xorg.conf at http://launchpadlibrarian.net/4845709/xorg.conf-ps2.diff and attached to this bug is problematic for the following reason:
An EndSection is in the wrong place.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.