[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacs Display Recangular blocks instead of fonts

From: Stephen J. Turnbull
Subject: Emacs Display Recangular blocks instead of fonts
Date: Mon, 27 May 2013 11:43:03 +0900

Kumar, Amit writes:

 > Cannot convert string "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to 
 > type FontStruct
 > Warning: Cannot convert string 
 > "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1" to type FontStruct

These are the old-style "server-side" font objects.  These warnings
are from Xlib, and indicate that you have a badly configured
installation of X11.  It's not really an Emacs problem; your distro is

 > What I don't understand is why is emacs resorting to these fonts,
 > if it has problems can't it use some other fonts to display a
 > normal screen?

It should be doing so; I don't know why it doesn't.  I would guess
that Emacs is not able to find any fonts at all.  You do seem to have
the appropriate fonts installed in your file system (the ones in
/usr/share/X11/fonts), so there's a problem with the X server.

I don't recall exactly how modern X servers handle server-side fonts.
You may need a separate "font server" running to use the bitmap and
other old-style fonts you have installed.  Look for a font-server
package (or change distros, see below).

 > Fonts directory listed in /etc/fonts/fonts.conf

This a configuration file for fontconfig, which is irrelevant to
FontStruct.  It's probable that your Emacs was built only with
server-side fonts (21.4 is very old), but your server doesn't
understand how to render them.  So it substitutes boxes.

The current series of Emacs is 24.x, and older Emacs versions are
officially unsupported.  That doesn't mean you won't get help, but it
does mean that there are no problems with Emacs 21 where the default
solution is anything but "Upgrade, then come talk to us".

If upgrading is possible, you really should do so (for many reasons,
not just to make it easier for us to support you).

(Aside: If Scientific Linux [sic] distributes such an old Emacs,
what other problems may be hiding in the distro?  All of the main
distros keep up with Emacs releases with a lag of only a couple weeks.
Many provide a "bleeding edge" beta package as well.  The evidence is
strong that Emacs is both a valuable package and one that is easy to
keep up to date.  If Scientific Linux doesn't do so ....)

 > $ fc-list | grep -i "courier"
 > Courier:style=Regular
 > $ fc-list | grep -i helvetica
 > Helvetica:style=Regular

These are again fontconfig specs; since fontconfig finds these fonts,
that's strong evidence that your Emacs is too old to render them.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]