Subject: Re: bug#10233: Font is not defined error at startup

From: Kenichi Handa <[email-masked]>
Date: Thu, 08 Dec 2011 11:39:06 +0900

In article <[email-masked]>, Dan Nicolaescu <[email-masked]> writes:

> When starting up the current trunk I get this error:

> Font `-b&h-lucidatypewriter-medium-r-normal-sans-12-120-75-75-m-70-iso10646-1'
> is not defined

> That font is set in .Xdefaults, and it has not changed in years.

> The cause is this checkin:

> 106614: Kenichi Handa 2011-12-05 [merge] ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, return Qnil

Oops, sorry, I made a silly mistake.  I've just installed
the attached change.  Please try again.  If it still doesn't
fix your problem, please let me know the value of fcstr
after the call of FcPatternGetString (p, FC_FONTFORMAT, 0,
&fcstr) in the change.

---
Kenichi Handa
[email-masked]

=== modified file 'src/ftfont.c'
--- src/ftfont.c	2011-12-05 07:48:29 +0000
+++ src/ftfont.c	2011-12-08 02:30:40 +0000
@@ -166,8 +166,8 @@
 
 #ifdef FC_FONTFORMAT
   if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch)
-      && (xstrcasecmp ((char *) fcstr, "bdf") != 0
-	  || xstrcasecmp ((char *) fcstr, "pcf") != 0))
+      && xstrcasecmp ((char *) fcstr, "bdf") != 0
+      && xstrcasecmp ((char *) fcstr, "pcf") != 0)
     /* Not a BDF nor PCF font.  */
     return Qnil;
 #endif