diff options
| author | Paul Eggert | 2011-04-15 00:48:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-15 00:48:51 -0700 |
| commit | 4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch) | |
| tree | e993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/ftxfont.c | |
| parent | 1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff) | |
| parent | 49093f601b69d91126aefd328ee8f6bfeb797407 (diff) | |
| download | emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip | |
Merge from mainline.
Diffstat (limited to 'src/ftxfont.c')
| -rw-r--r-- | src/ftxfont.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ftxfont.c b/src/ftxfont.c index c6fa858af74..bbba3ca8163 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -38,6 +38,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | 38 | ||
| 39 | static Lisp_Object Qftx; | 39 | static Lisp_Object Qftx; |
| 40 | 40 | ||
| 41 | #if defined HAVE_XFT || !defined HAVE_FREETYPE | ||
| 42 | static | ||
| 43 | #endif | ||
| 44 | struct font_driver ftxfont_driver; | ||
| 45 | |||
| 41 | /* Prototypes for helper function. */ | 46 | /* Prototypes for helper function. */ |
| 42 | static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); | 47 | static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); |
| 43 | static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, | 48 | static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, |
| @@ -233,13 +238,11 @@ static Lisp_Object ftxfont_open (FRAME_PTR, Lisp_Object, int); | |||
| 233 | static void ftxfont_close (FRAME_PTR, struct font *); | 238 | static void ftxfont_close (FRAME_PTR, struct font *); |
| 234 | static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); | 239 | static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); |
| 235 | 240 | ||
| 236 | struct font_driver ftxfont_driver; | ||
| 237 | |||
| 238 | static Lisp_Object | 241 | static Lisp_Object |
| 239 | ftxfont_list (Lisp_Object frame, Lisp_Object spec) | 242 | ftxfont_list (Lisp_Object frame, Lisp_Object spec) |
| 240 | { | 243 | { |
| 241 | Lisp_Object list = ftfont_driver.list (frame, spec), tail; | 244 | Lisp_Object list = ftfont_driver.list (frame, spec), tail; |
| 242 | 245 | ||
| 243 | for (tail = list; CONSP (tail); tail = XCDR (tail)) | 246 | for (tail = list; CONSP (tail); tail = XCDR (tail)) |
| 244 | ASET (XCAR (tail), FONT_TYPE_INDEX, Qftx); | 247 | ASET (XCAR (tail), FONT_TYPE_INDEX, Qftx); |
| 245 | return list; | 248 | return list; |
| @@ -350,13 +353,13 @@ static int | |||
| 350 | ftxfont_end_for_frame (FRAME_PTR f) | 353 | ftxfont_end_for_frame (FRAME_PTR f) |
| 351 | { | 354 | { |
| 352 | struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); | 355 | struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); |
| 353 | 356 | ||
| 354 | BLOCK_INPUT; | 357 | BLOCK_INPUT; |
| 355 | while (data) | 358 | while (data) |
| 356 | { | 359 | { |
| 357 | struct ftxfont_frame_data *next = data->next; | 360 | struct ftxfont_frame_data *next = data->next; |
| 358 | int i; | 361 | int i; |
| 359 | 362 | ||
| 360 | for (i = 0; i < 6; i++) | 363 | for (i = 0; i < 6; i++) |
| 361 | XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); | 364 | XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); |
| 362 | free (data); | 365 | free (data); |
| @@ -384,4 +387,3 @@ syms_of_ftxfont (void) | |||
| 384 | ftxfont_driver.end_for_frame = ftxfont_end_for_frame; | 387 | ftxfont_driver.end_for_frame = ftxfont_end_for_frame; |
| 385 | register_font_driver (&ftxfont_driver, NULL); | 388 | register_font_driver (&ftxfont_driver, NULL); |
| 386 | } | 389 | } |
| 387 | |||