Commit ce40fde6 authored by Adam Petaccia's avatar Adam Petaccia Committed by Alexandre Julliard

gdiplus: Implement GdipGetFontStyle.

parent 69b6e0bd
......@@ -298,11 +298,38 @@ GpStatus WINGDIPAPI GdipGetFontSize(GpFont *font, REAL *size)
return Ok;
}
/*******************************************************************************
* GdipGetFontStyle [GDIPLUS.@]
*
* Gets the font's style, returned in bitwise OR of FontStyle enumeration
*
* PARAMS
* font [I] font to request from
* style [O] resulting pointer to a FontStyle enumeration
*
* RETURNS
* SUCCESS: Ok
* FAILURE: InvalidParameter
*/
GpStatus WINGDIPAPI GdipGetFontStyle(GpFont *font, INT *style)
{
FIXME("stub: %p %p\n", font, style);
TRACE("%p %p\n", font, style);
return NotImplemented;
if (!(font && style))
return InvalidParameter;
if (font->lfw.lfWeight > 400)
*style = FontStyleBold;
else
*style = 0;
if (font->lfw.lfItalic)
*style |= FontStyleItalic;
if (font->lfw.lfUnderline)
*style |= FontStyleUnderline;
if (font->lfw.lfStrikeOut)
*style |= FontStyleStrikeout;
return Ok;
}
/*******************************************************************************
......
......@@ -172,13 +172,10 @@ todo_wine {
expect(0, lfw2.lfQuality);
expect(0, lfw2.lfPitchAndFamily);
todo_wine
{
stat = GdipGetFontStyle(font, &style);
expect(Ok, stat);
ok (style == (FontStyleItalic | FontStyleUnderline | FontStyleStrikeout),
"Expected , got %d\n", style);
}
GdipDeleteFont(font);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment