gdiplus: Use symbolic names of font styles.

Dmitry Timoshkov dmitry at baikal.ru
Fri Apr 20 02:43:24 CDT 2012


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

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 169e28f..1f598b2 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;
@@ -341,10 +341,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)
-- 
1.7.9.4




More information about the wine-patches mailing list