emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xfont.c,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/xfont.c,v
Date: Mon, 14 Jul 2008 07:44:47 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/07/14 07:44:46

Index: xfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfont.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- xfont.c     10 Jul 2008 01:25:59 -0000      1.18
+++ xfont.c     14 Jul 2008 07:44:46 -0000      1.19
@@ -540,6 +540,35 @@
       x_clear_errors (display);
       xfont = NULL;
     }
+  else if (! xfont)
+    {
+      /* Some version of X lists:
+          -misc-fixed-medium-r-normal--20-*-75-75-c-100-iso8859-1
+          -misc-fixed-medium-r-normal--20-*-100-100-c-100-iso8859-1
+        but can open only:
+          -misc-fixed-medium-r-normal--20-*-100-100-c-100-iso8859-1
+        and
+          -misc-fixed-medium-r-normal--20-*-*-*-c-100-iso8859-1
+        So, we try again with wildcards in RESX and RESY.  */
+      Lisp_Object temp;
+
+      temp = Fcopy_font_spec (entity);
+      ASET (temp, FONT_DPI_INDEX, Qnil);
+      len = font_unparse_xlfd (temp, pixel_size, name, 256);
+      if (len <= 0)
+       {
+         font_add_log ("  x:unparse failed", temp, Qnil);
+         return Qnil;
+       }
+      xfont = XLoadQueryFont (display, name);
+      if (x_had_errors_p (display))
+       {
+         /* This error is perhaps due to insufficient memory on X server.
+            Let's just ignore it.  */
+         x_clear_errors (display);
+         xfont = NULL;
+       }
+    }
   fullname = Qnil;
   /* Try to get the full name of FONT.  */
   if (xfont && XGetFontProperty (xfont, XA_FONT, &value))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]