forked from Mirrors/wine-wine
dwrite: Add partial implementation for IDWriteFontFaceReference1::CreateFontFace().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6ee109c5aa
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
stable
parent
81cca6bb78
commit
5d489c26e4
|
@ -6263,9 +6263,21 @@ static HRESULT WINAPI fontfacereference_EnqueueFileFragmentDownloadRequest(IDWri
|
|||
|
||||
static HRESULT WINAPI fontfacereference1_CreateFontFace(IDWriteFontFaceReference1 *iface, IDWriteFontFace5 **fontface)
|
||||
{
|
||||
FIXME("%p, %p.\n", iface, fontface);
|
||||
struct dwrite_fontfacereference *reference = impl_from_IDWriteFontFaceReference1(iface);
|
||||
IDWriteFontFace3 *fontface3;
|
||||
HRESULT hr;
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("%p, %p.\n", iface, fontface);
|
||||
|
||||
/* FIXME: created instance should likely respect given axis. */
|
||||
if (SUCCEEDED(hr = IDWriteFontFaceReference1_CreateFontFaceWithSimulations(iface, reference->simulations,
|
||||
&fontface3)))
|
||||
{
|
||||
hr = IDWriteFontFace3_QueryInterface(fontface3, &IID_IDWriteFontFace5, (void **)fontface);
|
||||
IDWriteFontFace3_Release(fontface3);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static UINT32 WINAPI fontfacereference1_GetFontAxisValueCount(IDWriteFontFaceReference1 *iface)
|
||||
|
|
|
@ -9537,6 +9537,10 @@ static void test_font_resource(void)
|
|||
ok(hr == S_OK, "Failed to get axis values, hr %#x.\n", hr);
|
||||
ok(axis_values[0].axisTag == DWRITE_FONT_AXIS_TAG_WEIGHT, "Unexpected axis tag.\n");
|
||||
|
||||
hr = IDWriteFontFaceReference1_CreateFontFace(reference, &fontface5);
|
||||
ok(hr == S_OK, "Failed to create a font face, hr %#x.\n", hr);
|
||||
IDWriteFontFace5_Release(fontface5);
|
||||
|
||||
IDWriteFontFaceReference1_Release(reference);
|
||||
|
||||
IDWriteFontFile_Release(fontfile);
|
||||
|
|
Loading…
Reference in New Issue