To: vim_dev@googlegroups.com Subject: Patch 8.1.1029 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1029 Problem: DirectWrite doesn't take 'linespace' into account. Solution: Include 'linespace' in the position. (Ken Takata, closes #4137) Files: src/gui_dwrite.cpp, src/gui_w32.c *** ../vim-8.1.1028/src/gui_dwrite.cpp 2019-03-16 15:24:39.333662581 +0100 --- src/gui_dwrite.cpp 2019-03-21 20:47:49.029799122 +0100 *************** *** 1031,1037 **** TextRenderer renderer(this); TextRendererContext context = { color, FLOAT(cellWidth), 0.0f }; ! textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y) - 0.5f); } SafeRelease(&textLayout); --- 1031,1037 ---- TextRenderer renderer(this); TextRendererContext context = { color, FLOAT(cellWidth), 0.0f }; ! textLayout->Draw(&context, &renderer, FLOAT(x), FLOAT(y)); } SafeRelease(&textLayout); *** ../vim-8.1.1028/src/gui_w32.c 2019-01-28 22:32:54.891909109 +0100 --- src/gui_w32.c 2019-03-21 20:47:49.029799122 +0100 *************** *** 6337,6343 **** { /* 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), gui.char_width, gui.currFgColor, foptions, pcliprect, unicodepdy); } --- 6337,6344 ---- { /* 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) - p_linespace, gui.char_width, gui.currFgColor, foptions, pcliprect, unicodepdy); } *** ../vim-8.1.1028/src/version.c 2019-03-21 19:57:57.491816288 +0100 --- src/version.c 2019-03-21 20:49:23.325083994 +0100 *************** *** 781,782 **** --- 781,784 ---- { /* Add new patch number below this line */ + /**/ + 1029, /**/ -- There's no place like $(HOME)! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///