From 559474f12d4753d7742f947c02f37b749acc6321 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sun, 17 Feb 2008 02:03:19 +0000 Subject: [PATCH] (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. --- src/ftxfont.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/ftxfont.c b/src/ftxfont.c index da56ef0faee..d7d8b710abc 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -46,7 +46,6 @@ static int ftxfont_draw_bitmap P_ ((FRAME_PTR, GC, GC *, struct font *, 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 @@ ftxfont_draw_backgrond (f, font, gc, x, y, width) 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 @@ ftxfont_open (f, entity, pixel_size) 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 @@ ftxfont_end_for_frame (f) data = next; } UNBLOCK_INPUT; + font_put_frame_data (f, &ftxfont_driver, NULL); return 0; } -- 2.39.5