Subject: Re: bug#11484: 23.4; Scrolling leaves traces of old text behind

From: Stefan Monnier <[email-masked]>
Date: Mon, 22 Oct 2012 21:22:29 -0400

>> If someone knows how to get misc-fixed-semicondensed-13 using xft
>> (i.e. client-side fonts), I'm all ears.
> At first, enable bitmap font in fontconfig (on Ubuntu, this
> is done by deleting /etc/fonts/conf.d/70-no-bitmaps.conf).

Indeed, that worked, thanks (tho the performance wasn't noticeably
better).

> Then copy PCF files of misc-fixed-semicondensed-13 fonts to ~/.fonts.

I didn't need to do that for the font I use (running Debian, here).

> Now Emacs should be able to use those PCF fonts via XFT.

It actually crashed with an assertion violation because a font `spec'
was nil where a vector was expected.  I used the quick-fix below which
appeared to work, but without knowing what it implies.  Can you take
a look and help me figure out what the right fix should be?

        Stefan

=== modified file 'src/frame.c'
--- src/frame.c	2012-10-20 21:30:51 +0000
+++ src/frame.c	2012-10-23 01:11:11 +0000
@@ -3242,7 +3242,7 @@
 	  Lisp_Object ascii_font = fontset_ascii (fontset);
 	  Lisp_Object spec = font_spec_from_name (ascii_font);
 
-	  if (! font_match_p (spec, font_object))
+	  if (NILP (spec) || ! font_match_p (spec, font_object))
 	    fontset = -1;
 	}
     }