Dmitry Timoshkov : comctl32: Use default GUI font as a fallback instead of a (non-existent) Arial.

Alexandre Julliard julliard at winehq.org
Mon Jun 17 14:07:47 CDT 2013


Module: wine
Branch: master
Commit: cc086f09ae46c77e6eb4a817ae567294d3f795ec
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cc086f09ae46c77e6eb4a817ae567294d3f795ec

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Jun 17 12:31:58 2013 +0900

comctl32: Use default GUI font as a fallback instead of a (non-existent) Arial.

---

 dlls/comctl32/tab.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index 229e72b..bd75c88 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -1898,7 +1898,6 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
     /* Draw the text */
     if(infoPtr->dwStyle & TCS_VERTICAL) /* if we are vertical rotate the text and each character */
     {
-      static const WCHAR ArialW[] = { 'A','r','i','a','l',0 };
       LOGFONTW logfont;
       HFONT hFont = 0;
       INT nEscapement = 900;
@@ -1911,21 +1910,11 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
       }
 
       /* to get a font with the escapement and orientation we are looking for, we need to */
-      /* call CreateFontIndirectA, which requires us to set the values of the logfont we pass in */
+      /* call CreateFontIndirect, which requires us to set the values of the logfont we pass in */
       if (!GetObjectW((infoPtr->hFont) ?
-                infoPtr->hFont : GetStockObject(SYSTEM_FONT),
+                infoPtr->hFont : GetStockObject(DEFAULT_GUI_FONT),
                 sizeof(LOGFONTW),&logfont))
-      {
-        INT iPointSize = 9;
-
-        lstrcpyW(logfont.lfFaceName, ArialW);
-        logfont.lfHeight = -MulDiv(iPointSize, GetDeviceCaps(hdc, LOGPIXELSY),
-                                    72);
-        logfont.lfWeight = FW_NORMAL;
-        logfont.lfItalic = 0;
-        logfont.lfUnderline = 0;
-        logfont.lfStrikeOut = 0;
-      }
+        GetStockObject(DEFAULT_GUI_FONT);
 
       logfont.lfEscapement = nEscapement;
       logfont.lfOrientation = nOrientation;




More information about the wine-cvs mailing list