diff options
| author | Kenichi Handa | 2008-05-14 01:00:37 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-14 01:00:37 +0000 |
| commit | 3af8ab1dc000a71160783f01deb8ed10db49b213 (patch) | |
| tree | 7d036ddb05d2f7f1201f7fed3f537bab147c5c7f /src | |
| parent | ef39ccbbe81a0e13875093d3665faf0b0ef1d756 (diff) | |
| download | emacs-3af8ab1dc000a71160783f01deb8ed10db49b213.tar.gz emacs-3af8ab1dc000a71160783f01deb8ed10db49b213.zip | |
Throughout the file, delete all USE_FONT_BACKEND
conditionals. Don't check enable_font_backend. Surround non-used
code by "#ifdef OLD_FONT" and "endif".
(FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
(FONT_AVG_WIDTH): Adjusted for the change of struct font.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/w32term.h b/src/w32term.h index 5af3eac8ade..87cf42b088a 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -27,16 +27,11 @@ Boston, MA 02110-1301, USA. */ | |||
| 27 | #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) | 27 | #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) |
| 28 | #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) | 28 | #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) |
| 29 | 29 | ||
| 30 | #define FONT_WIDTH(f) \ | 30 | #define FONT_WIDTH(f) ((f)->max_width) |
| 31 | ((f)->bdf ? (f)->bdf->width : (f)->tm.tmMaxCharWidth) | 31 | #define FONT_HEIGHT(f) ((f)->height) |
| 32 | #define FONT_HEIGHT(f) \ | 32 | #define FONT_BASE(f) ((f)->ascent) |
| 33 | ((f)->bdf ? (f)->bdf->height : (f)->tm.tmHeight) | 33 | #define FONT_DESCENT(f) ((f)->descent) |
| 34 | #define FONT_BASE(f) \ | 34 | #define FONT_AVG_WIDTH(f) ((f)->average_width) |
| 35 | ((f)->bdf ? (f)->bdf->ury : (f)->tm.tmAscent) | ||
| 36 | #define FONT_DESCENT(f) \ | ||
| 37 | ((f)->bdf ? -((f)->bdf->lly) : (f)->tm.tmDescent) | ||
| 38 | #define FONT_AVG_WIDTH(f) \ | ||
| 39 | ((f)->bdf ? (f)->bdf->width : (f)->tm.tmAveCharWidth) | ||
| 40 | 35 | ||
| 41 | #define CP_DEFAULT 1004 | 36 | #define CP_DEFAULT 1004 |
| 42 | /* Special pseudo-codepages. */ | 37 | /* Special pseudo-codepages. */ |
| @@ -152,11 +147,13 @@ struct w32_display_info | |||
| 152 | received; value is reset after key is received. */ | 147 | received; value is reset after key is received. */ |
| 153 | int faked_key; | 148 | int faked_key; |
| 154 | 149 | ||
| 150 | #if OLD_FONT | ||
| 155 | /* A table of all the fonts we have already loaded. */ | 151 | /* A table of all the fonts we have already loaded. */ |
| 156 | struct font_info *font_table; | 152 | struct font_info *font_table; |
| 157 | 153 | ||
| 158 | /* The current capacity of font_table. */ | 154 | /* The current capacity of font_table. */ |
| 159 | int font_table_size; | 155 | int font_table_size; |
| 156 | #endif | ||
| 160 | 157 | ||
| 161 | /* Minimum width over all characters in all fonts in font_table. */ | 158 | /* Minimum width over all characters in all fonts in font_table. */ |
| 162 | int smallest_char_width; | 159 | int smallest_char_width; |
| @@ -256,12 +253,14 @@ Lisp_Object display_x_get_resource P_ ((struct w32_display_info *, | |||
| 256 | 253 | ||
| 257 | extern struct w32_display_info *w32_term_init (); | 254 | extern struct w32_display_info *w32_term_init (); |
| 258 | 255 | ||
| 256 | #if OLD_FONT | ||
| 259 | extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); | 257 | extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); |
| 260 | extern struct font_info *w32_get_font_info (), *w32_query_font (); | 258 | extern struct font_info *w32_get_font_info (), *w32_query_font (); |
| 261 | extern void w32_cache_char_metrics (XFontStruct *font); | 259 | extern void w32_cache_char_metrics (XFontStruct *font); |
| 262 | extern void w32_find_ccl_program(); | 260 | extern void w32_find_ccl_program(); |
| 263 | extern Lisp_Object x_get_font_repertory P_ ((struct frame *, | 261 | extern Lisp_Object x_get_font_repertory P_ ((struct frame *, |
| 264 | struct font_info *)); | 262 | struct font_info *)); |
| 263 | #endif | ||
| 265 | 264 | ||
| 266 | #define PIX_TYPE COLORREF | 265 | #define PIX_TYPE COLORREF |
| 267 | 266 | ||
| @@ -324,11 +323,10 @@ struct w32_output | |||
| 324 | Window parent_desc; | 323 | Window parent_desc; |
| 325 | 324 | ||
| 326 | /* Default ASCII font of this frame. */ | 325 | /* Default ASCII font of this frame. */ |
| 326 | #if OLD_FONT | ||
| 327 | XFontStruct *font; | 327 | XFontStruct *font; |
| 328 | 328 | #endif | |
| 329 | #ifdef USE_FONT_BACKEND | 329 | struct font *font; |
| 330 | struct font *fontp; | ||
| 331 | #endif /* USE_FONT_BACKEND */ | ||
| 332 | 330 | ||
| 333 | /* The baseline offset of the default ASCII font. */ | 331 | /* The baseline offset of the default ASCII font. */ |
| 334 | int baseline_offset; | 332 | int baseline_offset; |
| @@ -416,10 +414,6 @@ extern struct w32_output w32term_display; | |||
| 416 | #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) | 414 | #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) |
| 417 | #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) | 415 | #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) |
| 418 | 416 | ||
| 419 | #ifdef USE_FONT_BACKEND | ||
| 420 | #define FRAME_FONT_OBJECT(f) ((f)->output_data.w32->fontp) | ||
| 421 | #endif /* USE_FONT_BACKEND */ | ||
| 422 | |||
| 423 | /* This gives the w32_display_info structure for the display F is on. */ | 417 | /* This gives the w32_display_info structure for the display F is on. */ |
| 424 | #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) | 418 | #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) |
| 425 | #define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info) | 419 | #define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info) |
| @@ -427,8 +421,10 @@ extern struct w32_output w32term_display; | |||
| 427 | /* This is the `Display *' which frame F is on. */ | 421 | /* This is the `Display *' which frame F is on. */ |
| 428 | #define FRAME_X_DISPLAY(f) (0) | 422 | #define FRAME_X_DISPLAY(f) (0) |
| 429 | 423 | ||
| 424 | #if OLD_FONT | ||
| 430 | /* This is the 'font_info *' which frame F has. */ | 425 | /* This is the 'font_info *' which frame F has. */ |
| 431 | #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) | 426 | #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) |
| 427 | #endif | ||
| 432 | 428 | ||
| 433 | /* Value is the smallest width of any character in any font on frame F. */ | 429 | /* Value is the smallest width of any character in any font on frame F. */ |
| 434 | 430 | ||
| @@ -599,8 +595,10 @@ do { \ | |||
| 599 | #define w32_clear_area(f,hdc,px,py,nx,ny) \ | 595 | #define w32_clear_area(f,hdc,px,py,nx,ny) \ |
| 600 | w32_fill_area (f, hdc, FRAME_BACKGROUND_PIXEL (f), px, py, nx, ny) | 596 | w32_fill_area (f, hdc, FRAME_BACKGROUND_PIXEL (f), px, py, nx, ny) |
| 601 | 597 | ||
| 598 | #if OLD_FONT | ||
| 602 | extern struct font_info *w32_load_font (); | 599 | extern struct font_info *w32_load_font (); |
| 603 | extern void w32_unload_font (); | 600 | extern void w32_unload_font (); |
| 601 | #endif | ||
| 604 | 602 | ||
| 605 | /* Define for earlier versions of Visual C */ | 603 | /* Define for earlier versions of Visual C */ |
| 606 | #ifndef WM_MOUSEWHEEL | 604 | #ifndef WM_MOUSEWHEEL |