Commit 6f7a9158 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Implement GetFontResource() for fontface.

parent 16152993
......@@ -1435,9 +1435,11 @@ static BOOL WINAPI dwritefontface5_HasVariations(IDWriteFontFace5 *iface)
static HRESULT WINAPI dwritefontface5_GetFontResource(IDWriteFontFace5 *iface, IDWriteFontResource **resource)
{
FIXME("%p, %p: stub\n", iface, resource);
struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, resource);
return IDWriteFactory7_CreateFontResource(fontface->factory, fontface->files[0], fontface->index, resource);
}
static const IDWriteFontFace5Vtbl dwritefontfacevtbl =
......
......@@ -9294,28 +9294,19 @@ if (SUCCEEDED(hr))
ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr);
hr = IDWriteFontFace5_GetFontResource(fontface5, &resource2);
todo_wine
ok(hr == S_OK, "Failed to get font resource, hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
ok(resource != resource2, "Unexpected resource instance.\n");
IDWriteFontResource_Release(resource);
}
hr = IDWriteFontFace5_GetFontResource(fontface5, &resource);
todo_wine
ok(hr == S_OK, "Failed to get font resource, hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
ok(resource != resource2, "Unexpected resource instance.\n");
EXPECT_REF(resource, 1);
IDWriteFontResource_Release(resource);
IDWriteFontResource_Release(resource2);
}
IDWriteFontFace5_Release(fontface5);
IDWriteFontResource_Release(resource);
IDWriteFontFile_Release(fontfile);
IDWriteFontFace_Release(fontface);
......
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