forked from aniani/vim
updated for version 7.4.393
Problem: Text drawing on newer MS-Windows systems is suboptimal. Some
multi-byte characters are not displayed, even though the same font
in Notepad can display them. (Srinath Avadhanula)
Solution: Add the 'renderoptions' option to enable Direct-X drawing. (Taro
Muraoka)
This commit is contained in:
@@ -2785,6 +2785,10 @@ _OnPaint(
|
||||
|
||||
out_flush(); /* make sure all output has been processed */
|
||||
(void)BeginPaint(hwnd, &ps);
|
||||
#if defined(FEAT_DIRECTX)
|
||||
if (IS_ENABLE_DIRECTX())
|
||||
DWriteContext_BeginDraw(s_dwc);
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_MBYTE
|
||||
/* prevent multi-byte characters from misprinting on an invalid
|
||||
@@ -2800,9 +2804,20 @@ _OnPaint(
|
||||
#endif
|
||||
|
||||
if (!IsRectEmpty(&ps.rcPaint))
|
||||
{
|
||||
#if defined(FEAT_DIRECTX)
|
||||
if (IS_ENABLE_DIRECTX())
|
||||
DWriteContext_BindDC(s_dwc, s_hdc, &ps.rcPaint);
|
||||
#endif
|
||||
gui_redraw(ps.rcPaint.left, ps.rcPaint.top,
|
||||
ps.rcPaint.right - ps.rcPaint.left + 1,
|
||||
ps.rcPaint.bottom - ps.rcPaint.top + 1);
|
||||
}
|
||||
|
||||
#if defined(FEAT_DIRECTX)
|
||||
if (IS_ENABLE_DIRECTX())
|
||||
DWriteContext_EndDraw(s_dwc);
|
||||
#endif
|
||||
EndPaint(hwnd, &ps);
|
||||
}
|
||||
}
|
||||
@@ -3043,6 +3058,12 @@ gui_mch_insert_lines(
|
||||
void
|
||||
gui_mch_exit(int rc)
|
||||
{
|
||||
#if defined(FEAT_DIRECTX)
|
||||
DWriteContext_Close(s_dwc);
|
||||
DWrite_Final();
|
||||
s_dwc = NULL;
|
||||
#endif
|
||||
|
||||
ReleaseDC(s_textArea, s_hdc);
|
||||
DeleteObject(s_brush);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user