# HG changeset patch
# Parent 66d1fa79d3445d604a9853994b58028c9f6b76d8
diff -r 66d1fa79d344 -r c1380b2dc597 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Fri Jan 25 21:27:42 2013 +0900
+++ b/runtime/doc/options.txt	Fri Jan 25 21:51:32 2013 +0900
@@ -2533,6 +2533,9 @@
 		set gfn=Ricty_Diminished:h12:cSHIFTJIS
 		set directx
 <
+	If select a raster font (Courier, Terminal or FixedSys) to 'guifont',
+	it fallbacks to be drawn by GDI automatically.
+
 					*'display'* *'dy'*
 'display' 'dy'		string	(default "")
 			global
diff -r 66d1fa79d344 -r c1380b2dc597 src/gui_w32.c
--- a/src/gui_w32.c	Fri Jan 25 21:27:42 2013 +0900
+++ b/src/gui_w32.c	Fri Jan 25 21:51:32 2013 +0900
@@ -2353,6 +2353,9 @@
 #endif
     HPEN	hpen, old_pen;
     int		y;
+#ifdef FEAT_DIRECTX
+    int		font_is_ttf = 0;
+#endif
 
 #ifndef MSWIN16_FASTTEXT
     /*
@@ -2442,7 +2445,16 @@
 
 #ifdef FEAT_DIRECTX
     if (IS_ENABLE_DIRECTX())
-	DWriteContext_SetFont(s_dwc, (HFONT)gui.currFont);
+    {
+	TEXTMETRIC tm;
+
+	GetTextMetrics(s_hdc, &tm);
+	if (tm.tmPitchAndFamily & TMPF_TRUETYPE)
+	{
+	    font_is_ttf = 1;
+	    DWriteContext_SetFont(s_dwc, (HFONT)gui.currFont);
+	}
+    }
 #endif
 
     if (pad_size != Columns || padding == NULL || padding[0] != gui.char_width)
@@ -2546,7 +2558,7 @@
 	    ++clen;
 	}
 #if defined(FEAT_DIRECTX)
-	if (IS_ENABLE_DIRECTX())
+	if (IS_ENABLE_DIRECTX() && font_is_ttf)
 	{
 	    DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen,
 		    TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1),
