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 40ff0782b88..d86107bc6d5 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -533,6 +533,7 @@ w32font_draw (struct glyph_string *s, int from, int to,
533{ 533{
534 UINT options; 534 UINT options;
535 HRGN orig_clip = NULL; 535 HRGN orig_clip = NULL;
536 int len = to - from;
536 struct w32font_info *w32font = (struct w32font_info *) s->font; 537 struct w32font_info *w32font = (struct w32font_info *) s->font;
537 538
538 options = w32font->glyph_idx; 539 options = w32font->glyph_idx;
@@ -581,14 +582,14 @@ w32font_draw (struct glyph_string *s, int from, int to,
581 582
582 if (s->padding_p) 583 if (s->padding_p)
583 { 584 {
584 int len = to - from, i; 585 int i;
585 586
586 for (i = 0; i < len; i++) 587 for (i = 0; i < len; i++)
587 ExtTextOutW (s->hdc, x + i, y, options, NULL, 588 ExtTextOutW (s->hdc, x + i, y, options, NULL,
588 s->char2b + from + i, 1, NULL); 589 s->char2b + from + i, 1, NULL);
589 } 590 }
590 else 591 else
591 ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, to - from, NULL); 592 ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL);
592 593
593 /* Restore clip region. */ 594 /* Restore clip region. */
594 if (s->num_clips > 0) 595 if (s->num_clips > 0)
@@ -596,6 +597,8 @@ w32font_draw (struct glyph_string *s, int from, int to,
596 597
597 if (orig_clip) 598 if (orig_clip)
598 DeleteObject (orig_clip); 599 DeleteObject (orig_clip);
600
601 return len;
599} 602}
600 603
601/* w32 implementation of free_entity for font backend. 604/* w32 implementation of free_entity for font backend.
@@ -774,7 +777,7 @@ int
774w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, 777w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
775 int pixel_size, Lisp_Object font_object) 778 int pixel_size, Lisp_Object font_object)
776{ 779{
777 int len, size, i; 780 int len, size;
778 LOGFONT logfont; 781 LOGFONT logfont;
779 HDC dc; 782 HDC dc;
780 HFONT hfont, old_font; 783 HFONT hfont, old_font;
@@ -2418,6 +2421,7 @@ struct font_driver w32font_driver =
2418 NULL, /* check */ 2421 NULL, /* check */
2419 NULL, /* get_variation_glyphs */ 2422 NULL, /* get_variation_glyphs */
2420 w32font_filter_properties, 2423 w32font_filter_properties,
2424 NULL, /* cached_font_ok */
2421 }; 2425 };
2422 2426
2423 2427