Commit d9c44605 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Implement IDWriteFont3::GetFontFaceReference().

parent 9777c77a
......@@ -1511,8 +1511,11 @@ static BOOL WINAPI dwritefont3_Equals(IDWriteFont3 *iface, IDWriteFont *font)
static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWriteFontFaceReference **reference)
{
struct dwrite_font *This = impl_from_IDWriteFont3(iface);
FIXME("(%p)->(%p): stub\n", This, reference);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, reference);
return IDWriteFactory3_CreateFontFaceReference_(This->data->factory, This->data->file, This->data->face_index,
This->data->simulations, reference);
}
static BOOL WINAPI dwritefont3_HasCharacter(IDWriteFont3 *iface, UINT32 ch)
......
......@@ -5830,6 +5830,8 @@ static void test_CreateFontFaceReference(void)
IDWriteFontFile *file, *file1;
IDWriteFactory3 *factory3;
IDWriteFactory *factory;
IDWriteFont3 *font3;
IDWriteFont *font;
UINT32 index;
WCHAR *path;
HRESULT hr;
......@@ -5921,6 +5923,23 @@ todo_wine
IDWriteFontFile_Release(file);
IDWriteFontFile_Release(file1);
/* references returned from IDWriteFont3 */
font = get_tahoma_instance((IDWriteFactory*)factory3, DWRITE_FONT_STYLE_NORMAL);
hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFont3, (void**)&font3);
ok(hr == S_OK, "got 0x%08x\n", hr);
IDWriteFont_Release(font);
hr = IDWriteFont3_GetFontFaceReference(font3, &ref);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = IDWriteFont3_GetFontFaceReference(font3, &ref1);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(ref != ref1, "got %p, %p\n", ref1, ref);
IDWriteFontFaceReference_Release(ref);
IDWriteFontFaceReference_Release(ref1);
IDWriteFont3_Release(font3);
IDWriteFactory3_Release(factory3);
DELETE_FONTFILE(path);
}
......
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