diff options
| author | Kenichi Handa | 2008-02-17 02:03:19 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-02-17 02:03:19 +0000 |
| commit | 559474f12d4753d7742f947c02f37b749acc6321 (patch) | |
| tree | ee8f78c347c740717998c95142d5d71cef404560 /src | |
| parent | d45fefc73cafdfae7dc5bc729d3ad35d78d48b67 (diff) | |
| download | emacs-559474f12d4753d7742f947c02f37b749acc6321.tar.gz emacs-559474f12d4753d7742f947c02f37b749acc6321.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftxfont.c | 28 |
1 files 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 *, | |||
| 46 | int)); | 46 | int)); |
| 47 | static void ftxfont_draw_backgrond P_ ((FRAME_PTR, struct font *, GC, | 47 | static void ftxfont_draw_backgrond P_ ((FRAME_PTR, struct font *, GC, |
| 48 | int, int, int)); | 48 | int, int, int)); |
| 49 | static Font ftxfont_default_fid P_ ((FRAME_PTR)); | ||
| 50 | 49 | ||
| 51 | struct ftxfont_frame_data | 50 | struct ftxfont_frame_data |
| 52 | { | 51 | { |
| @@ -242,29 +241,6 @@ ftxfont_draw_backgrond (f, font, gc, x, y, width) | |||
| 242 | XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground); | 241 | XSetForeground (FRAME_X_DISPLAY (f), gc, xgcv.foreground); |
| 243 | } | 242 | } |
| 244 | 243 | ||
| 245 | /* Return the default Font ID on frame F. */ | ||
| 246 | |||
| 247 | static Font | ||
| 248 | ftxfont_default_fid (f) | ||
| 249 | FRAME_PTR f; | ||
| 250 | { | ||
| 251 | static int fid_known; | ||
| 252 | static Font fid; | ||
| 253 | |||
| 254 | if (! fid_known) | ||
| 255 | { | ||
| 256 | fid = XLoadFont (FRAME_X_DISPLAY (f), "fixed"); | ||
| 257 | if (! fid) | ||
| 258 | { | ||
| 259 | fid = XLoadFont (FRAME_X_DISPLAY (f), "*"); | ||
| 260 | if (! fid) | ||
| 261 | abort (); | ||
| 262 | } | ||
| 263 | fid_known = 1; | ||
| 264 | } | ||
| 265 | return fid; | ||
| 266 | } | ||
| 267 | |||
| 268 | /* Prototypes for font-driver methods. */ | 244 | /* Prototypes for font-driver methods. */ |
| 269 | static Lisp_Object ftxfont_list P_ ((Lisp_Object, Lisp_Object)); | 245 | static Lisp_Object ftxfont_list P_ ((Lisp_Object, Lisp_Object)); |
| 270 | static Lisp_Object ftxfont_match P_ ((Lisp_Object, Lisp_Object)); | 246 | static Lisp_Object ftxfont_match P_ ((Lisp_Object, Lisp_Object)); |
| @@ -321,8 +297,7 @@ ftxfont_open (f, entity, pixel_size) | |||
| 321 | free (xfont); | 297 | free (xfont); |
| 322 | return NULL; | 298 | return NULL; |
| 323 | } | 299 | } |
| 324 | 300 | xfont->fid = (Font) 0; | |
| 325 | xfont->fid = ftxfont_default_fid (f); | ||
| 326 | xfont->ascent = font->ascent; | 301 | xfont->ascent = font->ascent; |
| 327 | xfont->descent = font->descent; | 302 | xfont->descent = font->descent; |
| 328 | xfont->max_bounds.width = font->font.size; | 303 | xfont->max_bounds.width = font->font.size; |
| @@ -455,6 +430,7 @@ ftxfont_end_for_frame (f) | |||
| 455 | data = next; | 430 | data = next; |
| 456 | } | 431 | } |
| 457 | UNBLOCK_INPUT; | 432 | UNBLOCK_INPUT; |
| 433 | font_put_frame_data (f, &ftxfont_driver, NULL); | ||
| 458 | return 0; | 434 | return 0; |
| 459 | } | 435 | } |
| 460 | 436 | ||