Skip to content

Instantly share code, notes, and snippets.

@k-takata
Created March 20, 2019 05:35
Show Gist options
  • Save k-takata/25c09354db14722d557d4065b676dfc3 to your computer and use it in GitHub Desktop.
Save k-takata/25c09354db14722d557d4065b676dfc3 to your computer and use it in GitHub Desktop.
diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp
--- a/src/gui_dwrite.cpp
+++ b/src/gui_dwrite.cpp
@@ -1034,7 +1034,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
@@ -6150,7 +6150,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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment