# HG changeset patch # User Kenichi Handa # Date 1203213799 0 # Node ID a18321dbb8fa6c3c5b34af967e4006843aab3346 # Parent 6ae79e72fea722da36a08a58051f5b4a6dd657f3 (ftxfont_default_fid): Delete it. (ftxfont_open): Set xfont->fid to 0. (ftxfont_end_for_frame): Clear data specifi to the frame and the font-driver. diff -r 6ae79e72fea7 -r a18321dbb8fa src/ftxfont.c --- a/src/ftxfont.c Sun Feb 17 02:03:07 2008 +0000 +++ b/src/ftxfont.c Sun Feb 17 02:03:19 2008 +0000 @@ -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; }