dwrite: Implement GetFontResource() for fontface.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-12-05 11:56:00 +03:00 committed by Alexandre Julliard
parent 16152993d6
commit 6f7a9158f4
2 changed files with 7 additions and 14 deletions

View File

@ -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 =

View File

@ -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))
{
hr = IDWriteFontFace5_GetFontResource(fontface5, &resource);
ok(hr == S_OK, "Failed to get font resource, hr %#x.\n", 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);