summaryrefslogtreecommitdiff
path: root/src/w32font.h
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2008-06-26 22:11:25 +0000
committerJason Rumney <jasonr@gnu.org>2008-06-26 22:11:25 +0000
commit96cd5086090d239250b4b5330241e7bc05b1ddce (patch)
tree03c2e4974064965e58677535f0c27222a222d4bd /src/w32font.h
parent4b6fd31d6426d3304c2199f0cf0218aab7211ae8 (diff)
downloademacs-96cd5086090d239250b4b5330241e7bc05b1ddce.tar.gz
* 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.
Diffstat (limited to 'src/w32font.h')
-rw-r--r--src/w32font.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/w32font.h b/src/w32font.h
index 30b6ed34271..25cf4ece560 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -56,6 +56,10 @@ struct w32font_info
HFONT hfont;
};
+/* Macros for getting OS specific information from a font struct. */
+#define FONT_HANDLE(f) (((struct w32font_info *)(f))->hfont)
+#define FONT_TEXTMETRIC(f) (((struct w32font_info *)(f))->metrics)
+
#define CACHE_BLOCKSIZE 128
Lisp_Object w32font_get_cache P_ ((FRAME_PTR fe));