Mercurial > emacs
changeset 91906:a18321dbb8fa
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 17 Feb 2008 02:03:19 +0000 |
parents | 6ae79e72fea7 |
children | 21cc6c5f4996 |
files | src/ftxfont.c |
diffstat | 1 files changed, 2 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- 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; }