patch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer
Commit:
https://github.com/vim/vim/commit/6238ee9f8945b9f62733ca050e99c1ce1cd18666
Author: Yasuhiro Matsumoto <[email protected]>
Date: Tue Mar 17 19:37:02 2026 +0000
patch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer
Problem: MS-Windows: rendering artifacts with DirectX renderer
Solution: Enable ETO_CLIPPED for DirectWrite rendering in
gui_mch_draw_string() to ensure glyphs stay within their
cell boundaries (Yasuhiro Matsumoto).
closes: #19711
Signed-off-by: Yasuhiro Matsumoto <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 09d90be79..bb5add2d1 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -6666,6 +6666,16 @@ gui_mch_draw_string(
pcliprect = &rc;
foptions = ETO_CLIPPED;
}
+#ifdef FEAT_DIRECTX
+ // DirectWrite anti-aliasing can extend glyph pixels beyond cell
+ // boundaries, leaving artifacts when adjacent cells are not
+ // redrawn. Clip to the cell rect to prevent this.
+ else if (IS_ENABLE_DIRECTX())
+ {
+ pcliprect = &rc;
+ foptions = ETO_CLIPPED;
+ }
+#endif
}
SetTextColor(s_hdc, gui.currFgColor);
SelectFont(s_hdc, gui.currFont);
diff --git a/src/version.c b/src/version.c
index 05bc54c3a..38adaa4f2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 187,
/**/
186,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1w2aLf-00AOxo-1Z%40256bit.org.