diff src/xterm.c @ 89845:982dd1857a87

(x_list_fonts): Fix the detection of an auto-scaled font.
author Kenichi Handa <handa@m17n.org>
date Thu, 04 Mar 2004 12:43:44 +0000
parents c734f0c6c3ca
children 68c22ea6027c
line wrap: on
line diff
--- a/src/xterm.c	Thu Mar 04 12:42:56 2004 +0000
+++ b/src/xterm.c	Thu Mar 04 12:43:44 2004 +0000
@@ -9576,8 +9576,9 @@
 	      int average_width = -1, resx = 0, dashes = 0;
 
 	      /* Count the number of dashes in NAMES[I].  If there are
-		 14 dashes, the field value following 9th dash
-		 (RESOLUTION_X) is nonzero, and the field value
+		 14 dashes, the field value following 7th dash
+		 (PIXEL_SIZE) is zero, the field value following 9th
+		 dash (RESOLUTION_X) is nonzero, and the field value
 		 following 12th dash (AVERAGE_WIDTH) is 0, this is a
 		 auto-scaled font which is usually too ugly to be used
 		 for editing.  Let's ignore it.  */
@@ -9594,7 +9595,8 @@
 		  }
 
 	      if (allow_auto_scaled_font
-		  || dashes < 14 || average_width != 0 || resx == 0)
+		  || dashes < 14
+		  || ! (width == 0 && resx != 0 && average_width == 0))
 		{
 		  tem = build_string (names[i]);
 		  if (NILP (Fassoc (tem, list)))