dwrite: Implement IDWriteFontFamily1::GetFontFaceReference().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e82cf8aa70
commit
c5259f72e3
|
@ -1994,13 +1994,24 @@ static HRESULT WINAPI dwritefontfamily1_GetFont(IDWriteFontFamily1 *iface, UINT3
|
|||
}
|
||||
|
||||
static HRESULT WINAPI dwritefontfamily1_GetFontFaceReference(IDWriteFontFamily1 *iface, UINT32 index,
|
||||
IDWriteFontFaceReference **ref)
|
||||
IDWriteFontFaceReference **reference)
|
||||
{
|
||||
struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily1(iface);
|
||||
IDWriteFont3 *font;
|
||||
HRESULT hr;
|
||||
|
||||
FIXME("(%p)->(%u %p): stub\n", This, index, ref);
|
||||
TRACE("(%p)->(%u %p)\n", This, index, reference);
|
||||
|
||||
return E_NOTIMPL;
|
||||
*reference = NULL;
|
||||
|
||||
hr = IDWriteFontFamily1_GetFont(iface, index, &font);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = IDWriteFont3_GetFontFaceReference(font, reference);
|
||||
IDWriteFont3_Release(font);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static const IDWriteFontFamily1Vtbl fontfamilyvtbl = {
|
||||
|
|
|
@ -1265,6 +1265,7 @@ if (0) /* crashes on native */
|
|||
|
||||
hr = IDWriteFontFamily_QueryInterface(family, &IID_IDWriteFontFamily1, (void**)&family1);
|
||||
if (hr == S_OK) {
|
||||
IDWriteFontFaceReference *ref, *ref1;
|
||||
IDWriteFontList *fontlist;
|
||||
IDWriteFont3 *font3;
|
||||
IDWriteFont1 *font1;
|
||||
|
@ -1293,6 +1294,17 @@ if (0) /* crashes on native */
|
|||
IDWriteFontList_Release(fontlist);
|
||||
|
||||
IDWriteFont3_Release(font3);
|
||||
|
||||
hr = IDWriteFontFamily1_GetFontFaceReference(family1, 0, &ref);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IDWriteFontFamily1_GetFontFaceReference(family1, 0, &ref1);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(ref != ref1, "got %p, %p\n", ref, ref1);
|
||||
|
||||
IDWriteFontFaceReference_Release(ref);
|
||||
IDWriteFontFaceReference_Release(ref1);
|
||||
|
||||
IDWriteFontFamily1_Release(family1);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue