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

Re: Broken X fonts in emacs21, emacs bug?



By now, you have probably fixed this problem, but I have been wrestling with font issues for several weeks now. I include a rough webpage with a recipe that has led to consistently pleasing fonts in both gnome and KDE.

Art Edwards

Daniel Johnson wrote:
Twice now I have found emacs21 display squares instead of fonts after
doing an update in Sid, and once they were fixed by an update.  It
seems that it is either an update to X, or some fonts package that
breaks things rather than emacs.  I believe both times that it broke
apt was updating both X, and something to do with fonts, but I can't
be sure of that.  Other versions of emacs seem to be fine such as,
emacs-snapshot, emacs-snapshot-gtk, xemacs21.  Also other athena
widget apps seem to be fine.  Fonts are fine when emacs is running in
a terminal.

I've talked to a pal who has the same problem, and I've seen similar
problems when searching through the debian mail archive, and have yet
to see a fix.  If this isn't a bug I would like some help fixing it.
I recently rebuilt my xorg.conf starting from X -configure here is a
clip from it, and a related bit from the log in case that helps anyone
tell me what is wrong.  Since other versions of emacs work it isn't
high priority for me, but if it's a bug I would like to get a bug
report filed.

Section "Files"
       RgbPath      "/usr/share/X11/rgb"
       ModulePath   "/usr/lib/xorg/modules"
       FontPath     "/usr/share/fonts/X11/misc/"
       FontPath     "/usr/share/fonts/X11/TTF/"
       FontPath     "/usr/share/fonts/X11/OTF"
       FontPath     "/usr/share/fonts/X11/Type1/"
       FontPath     "/usr/share/fonts/X11/CID/"
       FontPath     "/usr/share/fonts/X11/100dpi/"
       FontPath     "/usr/share/fonts/X11/75dpi/"
EndSection

(WW) The directory "/usr/share/fonts/X11/TTF/" does not exist.
       Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/OTF" does not exist.
       Entry deleted from font path.
(WW) The directory "/usr/share/fonts/X11/CID/" does not exist.
       Entry deleted from font path.




--
Arthur H. Edwards
Senior Research Physicist
Air Force Research Laboratory
AFRL/VSSE
Bldg. 914
3550 Aberdeen Ave. SE
KAFB, NM 87117-5776

(505) 853-6042 (O)
(505) 463-6722 (C)
(505) 846-2290 (F)

Fonts in Debian

Fonts have been a persistent and mysterious problem. In the past, I have simply installed every package with the word font in its name or discription and, eventually, the fonts looked reasonable. (This is similar to how I was told to work with classical thermodynamics, where one simply differentiates everything with respect to everything else and hopes for the best.) With the recent move top Xorg, this strategy, if I can call desperation a strategy, has failed. This came to a head when xemacs suddenly came up in what I think are called ttf-preschool fonts and I was forced to grapple with a problem that was both challenging and boring. I should point out that I am not paid to install fonts, but to do solid state physics. Because my curiosity about fonts is limited, I have developed a recipe based on some perusal of the web. I only claim that this has worked on three different boxes. I don't claim to know why.

  1. xorg.conf file

    Based on a web page (url to be installed later), the font paths in Section “Files” should be approximately
    in the following order (my comments, not present in my xorg.conf file, are in blue and surrounded by
    square brackets):

    Section "Files"
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/Type1"
    FontPath "/usr/share/fonts/truetype/msttcorefonts"
    # path to defoma font
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
    .
    .
    .
    [[All the rest of the ttf- font packages, i. e. ttf-lucida. Each of these creates a directory in /
    usr/share/fonts/truetype]]

    FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
    [[75dpi whould precede 100dpi so that fonts are not huge. Putting unscaled first is a better idea for
    flat panel displays]]

    FontPath "/usr/share/fonts/X11/75dpi"

  2. None of these font paths will work without a non-empty fonts.dir file. For example, the font path
    /usr/share/fonts/truetype/msttcorefonts
    will be removed from the list when xorg starts if there is no fonts.dir file in that directory. Insertion of a valid
    copy of this file requires the use of mkfontdir. For example,
    #mkfontdir /usr/share/fonts/truetype/msttcorefonts
    will do the trick
    if you have already created the fonts.scale file in /usr/share/fonts/truetype/msttcorefonts. Without that, the above command will place a useless, zero-length fonts.dir file in the directory.

    So, for each directroy under /usr/share/fonts/truetype, issue the following commands (order is crucial)

    #mkfontscale /usr/share/fonts/truetype/fontdir
    #mkfontdir /usr/share/fonts/truetype/fontdir

    where fontdir is the appropriate directory name (msttcorfonts, or ttf-bitstream-vera, as examples)


  3. Getting msttcorefonts from behind a proxy

    You might think that setting up the proxy in both apt (within the apt.conf file) and in the preferences for either gnome or kde would be enough. However, the msttcorefonts package doesn't look in either place. Instead, it looks in /etc/wgetrc, where it would like to find the lines

    http_proxy = http://yourproxy.yourdomain:yourport/
    ftp_proxy = http://yourproxy.yourdomain:yourport/




Reply to: