comparison src/w32font.h @ 96343:5c8f2b7d28ae

* w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros. * w32term.c (x_draw_glyph_string_foreground): (x_draw_composite_glyph_string_foreground): Sync with xterm.c. Use FONT_HANDLE macro. (x_draw_glyph_string): Use FONT_TEXTMETRIC macro. * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape): (uniscribe_encode_char): Use FONT_HANDLE macro. * w32font.c (Fx_select_font): Use FONT_HANDLE macro. (w32font_text_extents): Use precast w32_font. (w32font_close): Free cached metrics. (w32font_open_internal): Allocate space for name on stack.
author Jason Rumney <jasonr@gnu.org>
date Thu, 26 Jun 2008 22:11:25 +0000
parents 2fc5aff56d81
children 09abb4487286
comparison
equal deleted inserted replaced
96342:307d2d89ee24 96343:5c8f2b7d28ae
54 struct w32_metric_cache **cached_metrics; 54 struct w32_metric_cache **cached_metrics;
55 int n_cache_blocks; 55 int n_cache_blocks;
56 HFONT hfont; 56 HFONT hfont;
57 }; 57 };
58 58
59 /* Macros for getting OS specific information from a font struct. */
60 #define FONT_HANDLE(f) (((struct w32font_info *)(f))->hfont)
61 #define FONT_TEXTMETRIC(f) (((struct w32font_info *)(f))->metrics)
62
59 #define CACHE_BLOCKSIZE 128 63 #define CACHE_BLOCKSIZE 128
60 64
61 Lisp_Object w32font_get_cache P_ ((FRAME_PTR fe)); 65 Lisp_Object w32font_get_cache P_ ((FRAME_PTR fe));
62 Lisp_Object w32font_list_internal P_ ((Lisp_Object frame, 66 Lisp_Object w32font_list_internal P_ ((Lisp_Object frame,
63 Lisp_Object font_spec, 67 Lisp_Object font_spec,