We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 627fa5a commit 38564f8Copy full SHA for 38564f8
src/w32font.c
@@ -704,11 +704,23 @@ w32font_draw (struct glyph_string *s, int from, int to,
704
int i;
705
706
for (i = 0; i < len; i++)
707
- ExtTextOutW (s->hdc, x + i, y, options, NULL,
708
- s->char2b + from + i, 1, NULL);
+ {
+ WCHAR c = s->char2b[from + i] & 0xFFFF;
709
+ ExtTextOutW (s->hdc, x + i, y, options, NULL, &c, 1, NULL);
710
+ }
711
}
712
else
- ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL);
713
714
+ /* The number of glyphs in a glyph_string cannot be larger than
715
+ the maximum value of the 'used' member of a glyph_row, so we
716
+ are OK using alloca here. */
717
+ eassert (len <= SHRT_MAX);
718
+ WCHAR *chars = alloca (len * sizeof (WCHAR));
719
+ int j;
720
+ for (j = 0; j < len; j++)
721
+ chars[j] = s->char2b[from + j] & 0xFFFF;
722
+ ExtTextOutW (s->hdc, x, y, options, NULL, chars, len, NULL);
723
724
725
/* Restore clip region. */
726
if (s->num_clips > 0)
0 commit comments