]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer v9.2.0187
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Tue, 17 Mar 2026 19:37:02 +0000 (19:37 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 17 Mar 2026 19:37:02 +0000 (19:37 +0000)
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 <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui_w32.c
src/version.c

index 09d90be79186982b24f7fee1c9d946c7a0b69621..bb5add2d135a353ad23aa8cfc2f1c10afbccbe81 100644 (file)
@@ -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);
index 05bc54c3a562697463b8611869fbf0f6c9ee3e50..38adaa4f2f1c3d78b9be6f4586bf0d363eff0620 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    187,
 /**/
     186,
 /**/