Module: wine Branch: master Commit: 74c8117a4b2d8978a9dde96961a65c61ba090686 URL: http://source.winehq.org/git/wine.git/?a=commit;h=74c8117a4b2d8978a9dde96961...
Author: Adam Petaccia adam@tpetaccia.com Date: Wed Aug 27 17:22:12 2008 -0400
gdiplus: Don't create a font if there is no facename.
---
dlls/gdiplus/font.c | 3 +++ dlls/gdiplus/tests/font.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 9d37077..ef62ccb 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -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;
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index b396141..ab6d28c 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -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));