Subject: Re: bug#11813: bug#11850: crash (null font) running emacs built from git

From: Left Right <[email-masked]>
Date: Sun, 8 Jul 2012 19:29:16 +0300

Well, the thing is, it is not "my" font - I have absolutely no idea
what font it is, no other program beside Emacs is trying to use it,
and, of course, I didn't install it myself.

I regenerated the font cache - but that had no effect. Unfortunately
font configuration, at least in the Linuxes I had to work with is
spread over few dozens of files... so, I might be as well missing
something. However, There are few changes to configuration that I made
myself, I've posted my fonts.conf before, but it doesn't look like it
may at all be a problem. I'll copy its content yet again for clarity:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>none</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintmedium</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>false</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

Below are the "profiles" of different "font groups" in  /etc/fonts/conf.d

  -rw-r--r-- 1 root root  124 Mar 30 21:0900 kde.conf
  lrwxrwxrwx 1 root root   39 Mar 14 03:24 20-fix-globaladvance.conf
-> ../conf.avail/20-fix-globaladvance.conf
  lrwxrwxrwx 1 root root   39 Mar 14 03:24 20-unhint-small-vera.conf
-> ../conf.avail/20-unhint-small-vera.conf
  lrwxrwxrwx 1 root root   39 Mar 14 03:29 30-defoma.conf ->
/var/lib/defoma/fontconfig.d/fonts.conf
  lrwxrwxrwx 1 root root   36 Mar 14 03:24 30-metric-aliases.conf ->
../conf.avail/30-metric-aliases.conf
  lrwxrwxrwx 1 root root   33 Mar 14 03:24 30-urw-aliases.conf ->
../conf.avail/30-urw-aliases.conf
  lrwxrwxrwx 1 root root   30 Mar 14 03:24 40-nonlatin.conf ->
../conf.avail/40-nonlatin.conf
  lrwxrwxrwx 1 root root   27 Mar 14 03:24 45-latin.conf ->
../conf.avail/45-latin.conf
  lrwxrwxrwx 1 root root   31 Mar 14 03:24 49-sansserif.conf ->
../conf.avail/49-sansserif.conf
  lrwxrwxrwx 1 root root   26 Mar 14 03:24 50-user.conf ->
../conf.avail/50-user.conf
  lrwxrwxrwx 1 root root   27 Mar 14 03:24 51-local.conf ->
../conf.avail/51-local.conf
  lrwxrwxrwx 1 root root   27 Mar 14 03:24 60-latin.conf ->
../conf.avail/60-latin.conf
  lrwxrwxrwx 1 root root   35 Mar 14 03:24 65-fonts-persian.conf ->
../conf.avail/65-fonts-persian.conf
  lrwxrwxrwx 1 root root   30 Mar 14 03:24 65-nonlatin.conf ->
../conf.avail/65-nonlatin.conf
  lrwxrwxrwx 1 root root   29 Mar 14 03:24 69-unifont.conf ->
../conf.avail/69-unifont.conf
  lrwxrwxrwx 1 root root   40 Mar 14 03:29 70-no-bitmaps.conf ->
/etc/fonts/conf.avail/70-no-bitmaps.conf
  lrwxrwxrwx 1 root root   31 Mar 14 03:24 80-delicious.conf ->
../conf.avail/80-delicious.conf
  lrwxrwxrwx 1 root root   31 Mar 14 03:24 90-synthetic.conf ->
../conf.avail/90-synthetic.conf

The rest of the files in /etc/fonts/ directory are exactly the same as
they would be on other similar systems - I never modified them.

The date is the date of this system was installed. kde.conf is a bit
older - this is because after installing the defaults I've struggled
for a while with anti-aliasing, but, finally, it seems like I've found
a way to remove it completely. Sorry, most of my life I've been a
graphic artist, with books and fonts being my primary occupation. This
is why I think that computer AA fonts are a mistake (but I don't want
to go into this dispute)...

Anyway, if you have any suggestion about where should I look for the
font (I wouldn't mind fixing the font file itself!) I certainly will.
My problem is, however - I have absolutely no idea why and where does
Emacs find the settings that it is using. If I could suggest... there
is an option to set default font, and it lists some values that cannot
be interpreted as a font name. To be honest, I don't even know what
they mean, at first, I assumed those are the sizes in pixels of the
piece of screen allocated to draw a single glyph in the monospace
font, but that doesn't hold, those are neither em-squares, no height
of the roman majuscule or minuscule characters, nor with accents or
descents nor any other such combination... What I mean is these
"names": Default, fixed, 6x10, 6x12, 6x13, 7x13, 7x14, 8x13, 9x15,
10x20, 11x18, 12x24, clean 5x8, clean 6x8, clean 8x8, clean 8x10,
clean 8x14, clean 8x16, sony 8x16, lucidasanstypewriter-12,
lucidasanstypewriter-bold-14, lucidasanstypewriter-bold-24. I also
don't have Lucida font installed on my system and never had.

One more thing, not sure if it helps clarify anything: Emacs doesn't
use the same fonts as all other KDE applications do when rendering the
menus (it uses some elongated sans-serif font, which, proportionally,
resembles Helvetica, i.e. it is taller then Arial, and because of this
letters stand closer to each other some times hiding pieces of the
next letter. Also, because it uses the same font it uses for regular
text for hints (tips), the text in tips is trimmed from the bottom by
few pixels. Screenshot attached.

By the way, something similar happened to me with Emacs 23 too. It
didn't crash though, but it used some fonts I couldn't identify / find
on my system, but using some color scheme fixed that in a mysterious
way.

Inside attachment:
emacs-23-menu-bar.png - this is how menu bar looks in Emacs 23 on the
same desktop, the rest of KDE applications look just like that too.
emacs-24-menu-bar.png - this is how menu bar looks in Emacs 24.
emacs-missing-font-1.png - the tip (hint) with the font trimmed.

Best.

Oleg