aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32font.c')
-rw-r--r--src/w32font.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/w32font.c b/src/w32font.c
index 40ff0782b8..d86107bc6d 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -533,6 +533,7 @@ w32font_draw (struct glyph_string *s, int from, int to,
{
UINT options;
HRGN orig_clip = NULL;
+ int len = to - from;
struct w32font_info *w32font = (struct w32font_info *) s->font;
options = w32font->glyph_idx;
@@ -581,14 +582,14 @@ w32font_draw (struct glyph_string *s, int from, int to,
if (s->padding_p)
{
- int len = to - from, i;
+ int i;
for (i = 0; i < len; i++)
ExtTextOutW (s->hdc, x + i, y, options, NULL,
s->char2b + from + i, 1, NULL);
}
else
- ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, to - from, NULL);
+ ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL);
/* Restore clip region. */
if (s->num_clips > 0)
@@ -596,6 +597,8 @@ w32font_draw (struct glyph_string *s, int from, int to,
if (orig_clip)
DeleteObject (orig_clip);
+
+ return len;
}
/* w32 implementation of free_entity for font backend.
@@ -774,7 +777,7 @@ int
w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
int pixel_size, Lisp_Object font_object)
{
- int len, size, i;
+ int len, size;
LOGFONT logfont;
HDC dc;
HFONT hfont, old_font;
@@ -2418,6 +2421,7 @@ struct font_driver w32font_driver =
NULL, /* check */
NULL, /* get_variation_glyphs */
w32font_filter_properties,
+ NULL, /* cached_font_ok */
};