Commit 3049c947 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Implement GetFontSet() for families.

parent f40c2a19
......@@ -2725,9 +2725,12 @@ static HRESULT WINAPI dwritefontfamily2_GetMatchingFonts(IDWriteFontFamily2 *ifa
static HRESULT WINAPI dwritefontfamily2_GetFontSet(IDWriteFontFamily2 *iface, IDWriteFontSet1 **fontset)
{
FIXME("%p, %p.\n", iface, fontset);
struct dwrite_fontfamily *family = impl_from_IDWriteFontFamily2(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, fontset);
return fontset_create_from_font_data(family->collection->factory, family->data->fonts,
family->data->count, fontset);
}
static const IDWriteFontFamily2Vtbl fontfamilyvtbl =
......@@ -2806,9 +2809,12 @@ static HRESULT WINAPI dwritefontfamilylist1_GetFontFaceReference(IDWriteFontList
static HRESULT WINAPI dwritefontfamilylist2_GetFontSet(IDWriteFontList2 *iface, IDWriteFontSet1 **fontset)
{
FIXME("%p, %p.\n", iface, fontset);
struct dwrite_fontfamily *family = impl_family_from_IDWriteFontList2(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, fontset);
return fontset_create_from_font_data(family->collection->factory, family->data->fonts,
family->data->count, fontset);
}
static const IDWriteFontList2Vtbl fontfamilylistvtbl =
......
......@@ -1631,18 +1631,14 @@ if (0) /* crashes on native */
ok(fontlist == (IDWriteFontList *)fontlist2, "Unexpected interface pointer.\n");
hr = IDWriteFontList2_GetFontSet(fontlist2, &fontset);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IDWriteFontList2_GetFontSet(fontlist2, &fontset2);
todo_wine {
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(fontset != fontset2, "Unexpected instance.\n");
}
if (fontset2)
IDWriteFontSet1_Release(fontset2);
if (fontset)
IDWriteFontSet1_Release(fontset);
IDWriteFontSet1_Release(fontset2);
IDWriteFontSet1_Release(fontset);
IDWriteFontList2_Release(fontlist2);
}
......@@ -9959,17 +9955,13 @@ static void test_family_font_set(void)
if (SUCCEEDED(IDWriteFontFamily_QueryInterface(family, &IID_IDWriteFontFamily2, (void **)&family2)))
{
hr = IDWriteFontFamily2_GetFontSet(family2, &fontset);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IDWriteFontFamily2_GetFontSet(family2, &fontset2);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
ok(fontset != fontset2, "Unexpected fontset instance.\n");
IDWriteFontSet1_Release(fontset2);
IDWriteFontSet1_Release(fontset);
}
IDWriteFontFamily2_Release(family2);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment