int left_sbar_x; // Calculated x coord for left scrollbar
int right_sbar_x; // Calculated x coord for right scrollbar
int force_redraw; // Force a redraw even e.g. not resized
+#ifdef FEAT_DIRECTX
+ int directx_enabled; // DirectX (DirectWrite) rendering active
+#endif
#ifdef FEAT_MENU
# ifndef FEAT_GUI_GTK
// redraw that one if this one changed, no matter attributes.
if (gui.in_use && changed_this)
redraw_next = TRUE;
+# ifdef FEAT_DIRECTX
+ // DirectWrite subpixel rendering (especially with CFF/OTF
+ // fonts) can extend pixels beyond cell boundaries to the
+ // left. Redraw the current character if the previous one
+ // changed.
+ if (gui.directx_enabled && changed_this)
+ redraw_this = TRUE;
+# endif
#endif
ScreenAttrs[off_to] = ScreenAttrs[off_from];
if (n & HL_BOLD)
force_redraw_next = TRUE;
}
+#endif
+#ifdef FEAT_DIRECTX
+ // DirectWrite subpixel rendering can extend pixels beyond
+ // cell boundaries. Redraw the next character too.
+ if (gui.directx_enabled && need_redraw)
+ force_redraw_next = TRUE;
#endif
// When at the end of the text and overwriting a two-cell
// character with a one-cell character, need to clear the next
force_next = FALSE;
}
#endif // FEAT_GUI || defined(UNIX)
+#ifdef FEAT_DIRECTX
+ // DirectWrite subpixel rendering can extend pixels
+ // beyond cell boundaries. Redraw the next character.
+ if (gui.directx_enabled)
+ force_next = TRUE;
+#endif
ScreenLines[off] = c;
if (enc_utf8)
{