Commit 74c8117a authored by Adam Petaccia's avatar Adam Petaccia Committed by Alexandre Julliard

gdiplus: Don't create a font if there is no facename.

parent 5361f074
......@@ -169,6 +169,9 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
if(!logfont || !font)
return InvalidParameter;
if (logfont->lfFaceName[0] == 0)
return NotTrueTypeFont;
*font = GdipAlloc(sizeof(GpFont));
if(!*font) return OutOfMemory;
......
......@@ -112,9 +112,7 @@ static void test_logfont(void)
lfw.lfFaceName[0] = 0;
stat = GdipCreateFontFromLogfontW(hdc, &lfw, &font);
todo_wine {
expect(NotTrueTypeFont, stat);
}
memcpy(&lfw.lfFaceName, arial, 6 * sizeof(WCHAR));
......
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