summaryrefslogtreecommitdiff
path: root/src/w32uniscribe.c
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
commitc35f9821de5ec0cf127185890191ad0154600d0d (patch)
tree18fc6dbe64578d453a0004a8d7b7c4dc3a94e13c /src/w32uniscribe.c
parentec06f5c9a0d4fc01c3af9e14add64bb09f977fb6 (diff)
downloademacs-c35f9821de5ec0cf127185890191ad0154600d0d.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/w32uniscribe.c')
-rw-r--r--src/w32uniscribe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 494abef74db..366287e8de6 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -166,7 +166,7 @@ uniscribe_otf_capability (font)
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, ((struct w32font_info *) font)->hfont);
+ old_font = SelectObject (context, FONT_HANDLE(font));
features = otf_features (context, "GSUB");
XSETCAR (capability, features);
@@ -259,7 +259,7 @@ uniscribe_shape (lgstring)
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, uniscribe_font->w32_font.hfont);
+ old_font = SelectObject (context, FONT_HANDLE(font));
glyphs = alloca (max_glyphs * sizeof (WORD));
clusters = alloca (nchars * sizeof (WORD));
@@ -424,7 +424,7 @@ uniscribe_encode_char (font, c)
/* Use selected frame until API is updated to pass the frame. */
f = XFRAME (selected_frame);
context = get_frame_dc (f);
- old_font = SelectObject (context, ((struct w32font_info *) font)->hfont);
+ old_font = SelectObject (context, FONT_HANDLE(font));
retval = GetGlyphIndicesW (context, chars, 1, indices,
GGI_MARK_NONEXISTING_GLYPHS);