mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
gdiplus: Don't create a font if there is no facename.
This commit is contained in:
parent
5361f074a3
commit
74c8117a4b
2 changed files with 3 additions and 2 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue