mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
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 #4137)
This commit is contained in:
parent
9029b918f9
commit
60ebd524cf
@ -1031,7 +1031,7 @@ DWriteContext::DrawText(const WCHAR *text, int len,
|
|||||||
|
|
||||||
TextRenderer renderer(this);
|
TextRenderer renderer(this);
|
||||||
TextRendererContext context = { color, FLOAT(cellWidth), 0.0f };
|
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);
|
SafeRelease(&textLayout);
|
||||||
|
@ -6337,7 +6337,8 @@ gui_mch_draw_string(
|
|||||||
{
|
{
|
||||||
/* Add one to "cells" for italics. */
|
/* Add one to "cells" for italics. */
|
||||||
DWriteContext_DrawText(s_dwc, unicodebuf, wlen,
|
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,
|
gui.char_width, gui.currFgColor,
|
||||||
foptions, pcliprect, unicodepdy);
|
foptions, pcliprect, unicodepdy);
|
||||||
}
|
}
|
||||||
|
@ -779,6 +779,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1029,
|
||||||
/**/
|
/**/
|
||||||
1028,
|
1028,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user