diff options
| author | Kenichi Handa | 2008-02-17 02:03:32 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-02-17 02:03:32 +0000 |
| commit | 3370d9f5b36378e235dce457db9bed23a3f4aeec (patch) | |
| tree | 3819ba0c4669936c122b1ada2f51fa173355a5c7 | |
| parent | 559474f12d4753d7742f947c02f37b749acc6321 (diff) | |
| download | emacs-3370d9f5b36378e235dce457db9bed23a3f4aeec.tar.gz emacs-3370d9f5b36378e235dce457db9bed23a3f4aeec.zip | |
(xftfont_default_fid): Delete it.
(xftfont_open): Set xfont->fid to 0.
| -rw-r--r-- | src/xftfont.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/xftfont.c b/src/xftfont.c index 5694508dd65..3d854364617 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -67,7 +67,6 @@ struct xftface_info | |||
| 67 | static void xftfont_get_colors P_ ((FRAME_PTR, struct face *, GC gc, | 67 | static void xftfont_get_colors P_ ((FRAME_PTR, struct face *, GC gc, |
| 68 | struct xftface_info *, | 68 | struct xftface_info *, |
| 69 | XftColor *fg, XftColor *bg)); | 69 | XftColor *fg, XftColor *bg)); |
| 70 | static Font xftfont_default_fid P_ ((FRAME_PTR)); | ||
| 71 | 70 | ||
| 72 | 71 | ||
| 73 | /* Setup foreground and background colors of GC into FG and BG. If | 72 | /* Setup foreground and background colors of GC into FG and BG. If |
| @@ -135,31 +134,6 @@ xftfont_get_colors (f, face, gc, xftface_info, fg, bg) | |||
| 135 | } | 134 | } |
| 136 | } | 135 | } |
| 137 | 136 | ||
| 138 | /* Return the default Font ID on frame F. The Returned Font ID is | ||
| 139 | stored in the GC of the frame F, but the font is never used. So, | ||
| 140 | any ID is ok as long as it is valid. */ | ||
| 141 | |||
| 142 | static Font | ||
| 143 | xftfont_default_fid (f) | ||
| 144 | FRAME_PTR f; | ||
| 145 | { | ||
| 146 | static int fid_known; | ||
| 147 | static Font fid; | ||
| 148 | |||
| 149 | if (! fid_known) | ||
| 150 | { | ||
| 151 | fid = XLoadFont (FRAME_X_DISPLAY (f), "fixed"); | ||
| 152 | if (! fid) | ||
| 153 | { | ||
| 154 | fid = XLoadFont (FRAME_X_DISPLAY (f), "*"); | ||
| 155 | if (! fid) | ||
| 156 | abort (); | ||
| 157 | } | ||
| 158 | fid_known = 1; | ||
| 159 | } | ||
| 160 | return fid; | ||
| 161 | } | ||
| 162 | |||
| 163 | 137 | ||
| 164 | static Lisp_Object xftfont_list P_ ((Lisp_Object, Lisp_Object)); | 138 | static Lisp_Object xftfont_list P_ ((Lisp_Object, Lisp_Object)); |
| 165 | static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object)); | 139 | static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object)); |
| @@ -342,7 +316,7 @@ xftfont_open (f, entity, pixel_size) | |||
| 342 | font->font.vertical_centering = 0; | 316 | font->font.vertical_centering = 0; |
| 343 | 317 | ||
| 344 | /* Setup pseudo XFontStruct */ | 318 | /* Setup pseudo XFontStruct */ |
| 345 | xfont->fid = xftfont_default_fid (f); | 319 | xfont->fid = 0; |
| 346 | xfont->ascent = font->ascent; | 320 | xfont->ascent = font->ascent; |
| 347 | xfont->descent = font->descent; | 321 | xfont->descent = font->descent; |
| 348 | xfont->max_bounds.descent = font->descent; | 322 | xfont->max_bounds.descent = font->descent; |