Mercurial > vim
changeset 16048:728bef04b0d4 v8.1.1029
patch 8.1.1029: DirectWrite doesn't take 'linespace' into account
commit https://github.com/vim/vim/commit/60ebd524cf7a27c936cb34395cda9a7cc23abeae
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Mar 2019 21:00:05 +0100 |
parents | 6c72c41c706c |
children | 75c99104f6b5 |
files | src/gui_dwrite.cpp src/gui_w32.c src/version.c |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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); }