gdi32: Provide a non-blank font face name for ANSI_FIXED_FONT.
Dylan Smith
dylan.ah.smith at gmail.com
Thu Mar 4 04:17:29 CST 2010
This patch avoids using the wrong font when this stock font is selected,
which could be seen by modifying notepad to send WM_SETFONT to the edit
control with GetStockObject(ANSI_FIXED_FONT) for wParam.
The correct font face name can be tested for by calling passing
GetStockObject(ANSI_FIXED_FONT) into GetObject, and I found it to be
"Courier" in the LOGFONT's lfFaceName field. Wine provides the Courier
font so it should be used in this case.
---
dlls/gdi32/gdiobj.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c
index 3c8bdfa..3f84f9c 100644
--- a/dlls/gdi32/gdiobj.c
+++ b/dlls/gdi32/gdiobj.c
@@ -89,7 +89,8 @@ static const LOGFONTW OEMFixedFont =
static const LOGFONTW AnsiFixedFont =
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, {'\0'} };
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN,
+ {'C','o','u','r','i','e','r','\0'} };
static const LOGFONTW AnsiVarFont =
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
--
1.6.3.3
More information about the wine-patches
mailing list