Dmitry Timoshkov : gdiplus: Use symbolic names of font styles.

Alexandre Julliard julliard at winehq.org
Mon Apr 23 13:41:37 CDT 2012


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Apr 20 16:43:24 2012 +0900

gdiplus: Use symbolic names of font styles.

---

 dlls/gdiplus/font.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 1ac7604..df3d407 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -148,7 +148,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
 
     lfw->lfHeight = (*font)->pixel_size * -1;
 
-    lfw->lfWeight = style & FontStyleBold ? 700 : 400;
+    lfw->lfWeight = style & FontStyleBold ? FW_BOLD : FW_REGULAR;
     lfw->lfItalic = style & FontStyleItalic;
     lfw->lfUnderline = style & FontStyleUnderline;
     lfw->lfStrikeOut = style & FontStyleStrikeout;
@@ -340,10 +340,10 @@ GpStatus WINGDIPAPI GdipGetFontStyle(GpFont *font, INT *style)
     if (!(font && style))
         return InvalidParameter;
 
-    if (font->lfw.lfWeight > 400)
+    if (font->lfw.lfWeight > FW_REGULAR)
         *style = FontStyleBold;
     else
-        *style = 0;
+        *style = FontStyleRegular;
     if (font->lfw.lfItalic)
         *style |= FontStyleItalic;
     if (font->lfw.lfUnderline)




More information about the wine-cvs mailing list