changeset 3639:70a688f0cdae

* xterm.c (x_new_font): If font_names is zero, that's all the indication we get that no matches were found.
author Jim Blandy <jimb@redhat.com>
date Fri, 11 Jun 1993 07:02:36 +0000
parents 45169f86d3a4
children df1a2751ca24
files src/xterm.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Fri Jun 11 07:00:05 1993 +0000
+++ b/src/xterm.c	Fri Jun 11 07:02:36 1993 +0000
@@ -3935,6 +3935,11 @@
   font_names = (char **) XListFontsWithInfo (x_current_display, fontname,
 					     1024, &n_matching_fonts,
 					     &font_info);
+  /* Apparently it doesn't set n_matching_fonts to zero when it can't
+     find any matches; font_names == 0 is the only clue.  */
+  if (! font_names)
+    n_matching_fonts = 0;
+
   /* Don't just give up if n_matching_fonts is 0.
      Apparently there's a bug on Suns: XListFontsWithInfo can
      fail to find a font, but XLoadQueryFont may still find it.  */