From d804fdf4c25435284333258856bc265f1ff10b09 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 27 Feb 2016 16:04:58 +0100 Subject: patch 7.4.1429 Problem: On MS-Windows, when not use renderoptions=type:directx, drawing emoji will be broken. Solution: Fix usage of unicodepdy. (Yasuhiro Matsumoto) --- src/gui_w32.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gui_w32.c') diff --git a/src/gui_w32.c b/src/gui_w32.c index edfe24e560..aff0ba26aa 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -6658,7 +6658,13 @@ gui_mch_draw_string( /* Use unicodepdy to make characters fit as we expect, even * when the font uses different widths (e.g., bold character * is wider). */ - unicodepdy[clen] = cw * gui.char_width; + if (c >= 0x10000) + { + unicodepdy[wlen - 2] = cw * gui.char_width; + unicodepdy[wlen - 1] = 0; + } + else + unicodepdy[wlen - 1] = cw * gui.char_width; } cells += cw; i += utfc_ptr2len_len(text + i, len - i); -- cgit v1.2.3