# HG changeset patch # User Bram Moolenaar # Date 1553198405 -3600 # Node ID 728bef04b0d46e980c878024417f9c124d92909b # Parent 6c72c41c706c33cce886791c3703a59383810ff1 patch 8.1.1029: DirectWrite doesn't take 'linespace' into account commit https://github.com/vim/vim/commit/60ebd524cf7a27c936cb34395cda9a7cc23abeae Author: Bram Moolenaar Date: Thu Mar 21 20:50:12 2019 +0100 patch 8.1.1029: DirectWrite doesn't take 'linespace' into account Problem: DirectWrite doesn't take 'linespace' into account. Solution: Include 'linespace' in the position. (Ken Takata, closes https://github.com/vim/vim/issues/4137) diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp --- a/src/gui_dwrite.cpp +++ b/src/gui_dwrite.cpp @@ -1031,7 +1031,7 @@ DWriteContext::DrawText(const WCHAR *tex 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); diff --git a/src/gui_w32.c b/src/gui_w32.c --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -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); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -780,6 +780,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1029, +/**/ 1028, /**/ 1027,