]> granicus.if.org Git - vim/commitdiff
patch 8.1.1029: DirectWrite doesn't take 'linespace' into account v8.1.1029
authorBram Moolenaar <Bram@vim.org>
Thu, 21 Mar 2019 19:50:12 +0000 (20:50 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 21 Mar 2019 19:50:12 +0000 (20:50 +0100)
Problem:    DirectWrite doesn't take 'linespace' into account.
Solution:   Include 'linespace' in the position. (Ken Takata, closes #4137)

src/gui_dwrite.cpp
src/gui_w32.c
src/version.c

index 17fa6e798aaf4b635961eb76a9a99021aa4e74c2..4a24a0306f46d4c6d71288db501128c3b4d9aed4 100644 (file)
@@ -1031,7 +1031,7 @@ DWriteContext::DrawText(const WCHAR *text, int len,
 
        TextRenderer renderer(this);
        TextRendererContext context = { color, FLOAT(cellWidth), 0.0f };
-       textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y) - 0.5f);
+       textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y));
     }
 
     SafeRelease(&textLayout);
index ead617a79f9e86623ec302080b71caeabc968e19..e8336b56f6aeada2bb1a2d0dfaef0e9aff4c5cf7 100644 (file)
@@ -6337,7 +6337,8 @@ gui_mch_draw_string(
        {
            /* Add one to "cells" for italics. */
            DWriteContext_DrawText(s_dwc, unicodebuf, wlen,
-                   TEXT_X(col), TEXT_Y(row), FILL_X(cells + 1), FILL_Y(1),
+                   TEXT_X(col), TEXT_Y(row),
+                   FILL_X(cells + 1), FILL_Y(1) - p_linespace,
                    gui.char_width, gui.currFgColor,
                    foptions, pcliprect, unicodepdy);
        }
index cebd9207c13dd1be15fcedfe3260b90201c172f9..5cca93064298d687eb3ed1fec129e2b43bdc4108 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1029,
 /**/
     1028,
 /**/