gdiplus: Use symbolic names of font styles.

This commit is contained in:
Dmitry Timoshkov 2012-04-20 16:43:24 +09:00 committed by Alexandre Julliard
parent 9b5b04c1c1
commit 44ec1a2e52
1 changed files with 3 additions and 3 deletions

View File

@ -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)