Vincent Povirk : gdiplus: Create a static InstalledFontCollection object, currently empty.

Alexandre Julliard julliard at winehq.org
Tue Apr 28 07:53:00 CDT 2009


Module: wine
Branch: master
Commit: 73eea0d05ffbe810092840f70c7fbce55f2bc8b0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=73eea0d05ffbe810092840f70c7fbce55f2bc8b0

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Mon Apr 27 16:24:47 2009 -0500

gdiplus: Create a static InstalledFontCollection object, currently empty.

---

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

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 6454765..68540e4 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -36,6 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL (gdiplus);
 static const REAL mm_per_inch = 25.4;
 static const REAL inch_per_point = 1.0/72.0;
 
+static GpFontCollection installedFontCollection = {0};
+
 static inline REAL get_dpi (void)
 {
     REAL dpi;
@@ -936,5 +938,7 @@ GpStatus WINGDIPAPI GdipNewInstalledFontCollection(
     if (!fontCollection)
         return InvalidParameter;
 
-    return NotImplemented;
+    *fontCollection = &installedFontCollection;
+
+    return Ok;
 }
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 6fbb8e2..0da5b2f 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -349,8 +349,8 @@ static void test_installedfonts (void)
     expect (InvalidParameter, stat);
 
     stat = GdipNewInstalledFontCollection(&collection);
-    todo_wine expect (Ok, stat);
-    todo_wine ok (collection != NULL, "got NULL font collection\n");
+    expect (Ok, stat);
+    ok (collection != NULL, "got NULL font collection\n");
 }
 
 START_TEST(font)




More information about the wine-cvs mailing list