emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/ftxfont.c,v
Date: Sun, 17 Feb 2008 02:03:20 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/02/17 02:03:20

Index: ftxfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ftxfont.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- ftxfont.c   7 Feb 2008 01:14:21 -0000       1.5
+++ ftxfont.c   17 Feb 2008 02:03:19 -0000      1.6
@@ -46,7 +46,6 @@
                                    int));
 static void ftxfont_draw_backgrond P_ ((FRAME_PTR, struct font *, GC,
                                        int, int, int));
-static Font ftxfont_default_fid P_ ((FRAME_PTR));
 
 struct ftxfont_frame_data
 {
@@ -242,29 +241,6 @@
   XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground);
 }
 
-/* Return the default Font ID on frame F.  */
-
-static Font
-ftxfont_default_fid (f)
-     FRAME_PTR f;
-{
-  static int fid_known;
-  static Font fid;
-
-  if (! fid_known)
-    {
-      fid = XLoadFont (FRAME_X_DISPLAY (f), "fixed");
-      if (! fid)
-       {
-         fid = XLoadFont (FRAME_X_DISPLAY (f), "*");
-         if (! fid)
-           abort ();
-       }
-      fid_known = 1;
-    }
-  return fid;
-}
-
 /* Prototypes for font-driver methods.  */
 static Lisp_Object ftxfont_list P_ ((Lisp_Object, Lisp_Object));
 static Lisp_Object ftxfont_match P_ ((Lisp_Object, Lisp_Object));
@@ -321,8 +297,7 @@
       free (xfont);
       return NULL;
     }
-
-  xfont->fid = ftxfont_default_fid (f);
+  xfont->fid = (Font) 0;
   xfont->ascent = font->ascent;
   xfont->descent = font->descent;
   xfont->max_bounds.width = font->font.size;
@@ -455,6 +430,7 @@
       data = next;
     }
   UNBLOCK_INPUT;
+  font_put_frame_data (f, &ftxfont_driver, NULL);
   return 0;
 }
 




reply via email to

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