diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 9348f5b7c3..71df2886e8 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -789,12 +789,17 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamil */ GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection** fontCollection) { - FIXME("stub %p\n", fontCollection); + TRACE("%p\n", fontCollection); if (!fontCollection) return InvalidParameter; - return NotImplemented; + *fontCollection = GdipAlloc(sizeof(GpFontCollection)); + if (!*fontCollection) return OutOfMemory; + + (*fontCollection)->FontFamilies = NULL; + (*fontCollection)->count = 0; + return Ok; } /***************************************************************************** @@ -802,12 +807,17 @@ GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection** fontCollecti */ GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection **fontCollection) { - FIXME("stub %p\n", fontCollection); + INT i; + + TRACE("%p\n", fontCollection); if (!fontCollection) return InvalidParameter; - return NotImplemented; + for (i = 0; i < (*fontCollection)->count; i++) GdipFree((*fontCollection)->FontFamilies[i]); + GdipFree(*fontCollection); + + return Ok; } /***************************************************************************** diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 57d63c2d35..2dde79ba71 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -225,7 +225,8 @@ struct GpStringFormat{ }; struct GpFontCollection{ - GpFontFamily* FontFamilies; + GpFontFamily **FontFamilies; + INT count; }; struct GpFontFamily{