changeset 23684:25077ab7295c

(x_list_fonts): Don't change the value of maxnames.
author Kenichi Handa <handa@m17n.org>
date Wed, 11 Nov 1998 03:36:15 +0000
parents cb300ad44b55
children 14c75dfaaa44
files src/xterm.c
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Tue Nov 10 21:07:13 1998 +0000
+++ b/src/xterm.c	Wed Nov 11 03:36:15 1998 +0000
@@ -6469,12 +6469,6 @@
   if (maxnames == 1 && !size)
     /* We can return any single font matching PATTERN.  */
     try_XLoadQueryFont = 1;
-  else
-    {
-      /* We try at least 10 fonts because XListFonts will return
-	 auto-scaled fonts at the head.  */
-      if (maxnames < 10) maxnames = 10;
-    }
 
   for (; CONSP (patterns); patterns = XCONS (patterns)->cdr)
     {
@@ -6535,7 +6529,9 @@
 	}
 
       if (!try_XLoadQueryFont)
-	names = XListFonts (dpy, XSTRING (pattern)->data, maxnames,
+	/* We try at least 10 fonts because XListFonts will return
+	   auto-scaled fonts at the head.  */
+	names = XListFonts (dpy, XSTRING (pattern)->data, max (maxnames, 10),
 			    &num_fonts);
       UNBLOCK_INPUT;