[Gdiplus 4/9] Implement GdipGetFamily

Adam Petaccia adam at tpetaccia.com
Sat Aug 16 22:28:55 CDT 2008


---
 dlls/gdiplus/font.c       |    7 +++++--
 dlls/gdiplus/tests/font.c |    2 --
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index e0419b2..c04ac27 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -268,9 +268,12 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
  */
 GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family)
 {
-    FIXME("stub: %p %p\n", font, family);
+    TRACE("%p %p\n", font, family);
 
-    return NotImplemented;
+    if (!(font && family))
+        return InvalidParameter;
+
+    return GdipCreateFontFamilyFromName(font->lfw.lfFaceName, NULL, family);
 }
 
 /******************************************************************************
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 5fce0b9..b1a4a78 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -67,11 +67,9 @@ static void test_createfont(void)
     expect (UnitPoint, unit);
 
     stat = GdipGetFamily(font, &fontfamily2);
-todo_wine
     expect(Ok, stat);
     stat = GdipGetFamilyName(fontfamily2, familyname, 0);
     expect(Ok, stat);
-todo_wine
     ok (lstrcmpiW(arial, familyname) == 0, "Expected arial, got %s\n",
             debugstr_w(familyname));
     stat = GdipDeleteFontFamily(fontfamily2);
-- 
1.5.4.3




More information about the wine-patches mailing list