dwrite: Use IDWriteFactory7 for fontface reference object.

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:02 +03:00 committed by Alexandre Julliard
parent 7e665fd267
commit 4215984d8d
3 changed files with 10 additions and 13 deletions

View file

@ -262,7 +262,7 @@ extern void release_system_fontfallback(IDWriteFontFallback1 *fallback) DECLSPEC
extern HRESULT create_fontfallback_builder(IDWriteFactory5*,IDWriteFontFallbackBuilder**) DECLSPEC_HIDDEN;
extern HRESULT create_matching_font(IDWriteFontCollection*,const WCHAR*,DWRITE_FONT_WEIGHT,DWRITE_FONT_STYLE,DWRITE_FONT_STRETCH,
IDWriteFont**) DECLSPEC_HIDDEN;
extern HRESULT create_fontfacereference(IDWriteFactory5 *factory, IDWriteFontFile *file, UINT32 face_index,
extern HRESULT create_fontfacereference(IDWriteFactory7 *factory, IDWriteFontFile *file, UINT32 face_index,
DWRITE_FONT_SIMULATIONS simulations, DWRITE_FONT_AXIS_VALUE const *axis_values, UINT32 axis_values_count,
IDWriteFontFaceReference1 **reference) DECLSPEC_HIDDEN;
extern HRESULT factory_get_cached_fontface(IDWriteFactory5*,IDWriteFontFile*const*,UINT32,DWRITE_FONT_SIMULATIONS,

View file

@ -233,7 +233,7 @@ struct dwrite_fontfacereference
USHORT simulations;
DWRITE_FONT_AXIS_VALUE *axis_values;
UINT32 axis_values_count;
IDWriteFactory5 *factory;
IDWriteFactory7 *factory;
};
struct dwrite_fontresource
@ -6082,7 +6082,7 @@ static ULONG WINAPI fontfacereference_Release(IDWriteFontFaceReference1 *iface)
if (!refcount)
{
IDWriteFontFile_Release(reference->file);
IDWriteFactory5_Release(reference->factory);
IDWriteFactory7_Release(reference->factory);
heap_free(reference->axis_values);
heap_free(reference);
}
@ -6116,7 +6116,7 @@ static HRESULT WINAPI fontfacereference_CreateFontFaceWithSimulations(IDWriteFon
if (FAILED(hr))
return hr;
hr = IDWriteFactory5_CreateFontFace(reference->factory, face_type, 1, &reference->file, reference->index,
hr = IDWriteFactory7_CreateFontFace(reference->factory, face_type, 1, &reference->file, reference->index,
simulations, &fontface);
if (SUCCEEDED(hr))
{
@ -6182,7 +6182,7 @@ static HRESULT WINAPI fontfacereference_GetFontFile(IDWriteFontFaceReference1 *i
if (FAILED(hr))
return hr;
hr = IDWriteFactory5_CreateCustomFontFileReference(reference->factory, key, key_size, loader, file);
hr = IDWriteFactory7_CreateCustomFontFileReference(reference->factory, key, key_size, loader, file);
IDWriteFontFileLoader_Release(loader);
return hr;
@ -6295,7 +6295,7 @@ static const IDWriteFontFaceReference1Vtbl fontfacereferencevtbl =
fontfacereference1_GetFontAxisValues,
};
HRESULT create_fontfacereference(IDWriteFactory5 *factory, IDWriteFontFile *file, UINT32 index,
HRESULT create_fontfacereference(IDWriteFactory7 *factory, IDWriteFontFile *file, UINT32 index,
DWRITE_FONT_SIMULATIONS simulations, DWRITE_FONT_AXIS_VALUE const *axis_values, UINT32 axis_values_count,
IDWriteFontFaceReference1 **ret)
{
@ -6314,7 +6314,7 @@ HRESULT create_fontfacereference(IDWriteFactory5 *factory, IDWriteFontFile *file
object->refcount = 1;
object->factory = factory;
IDWriteFactory5_AddRef(object->factory);
IDWriteFactory7_AddRef(object->factory);
object->file = file;
IDWriteFontFile_AddRef(object->file);
object->index = index;

View file

@ -1443,8 +1443,7 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference_(IDWriteFactory7 *i
{
TRACE("%p, %p, %u, %x, %p.\n", iface, file, index, simulations, reference);
return create_fontfacereference((IDWriteFactory5 *)iface, file, index, simulations, NULL, 0,
(IDWriteFontFaceReference1 **)reference);
return create_fontfacereference(iface, file, index, simulations, NULL, 0, (IDWriteFontFaceReference1 **)reference);
}
static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *iface, WCHAR const *path,
@ -1463,8 +1462,7 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *if
return hr;
}
hr = create_fontfacereference((IDWriteFactory5 *)iface, file, index, simulations, NULL, 0,
(IDWriteFontFaceReference1 **)reference);
hr = create_fontfacereference(iface, file, index, simulations, NULL, 0, (IDWriteFontFaceReference1 **)reference);
IDWriteFontFile_Release(file);
return hr;
}
@ -1664,8 +1662,7 @@ static HRESULT WINAPI dwritefactory6_CreateFontFaceReference(IDWriteFactory7 *if
TRACE("%p, %p, %u, %#x, %p, %u, %p.\n", iface, file, face_index, simulations, axis_values, axis_values_count,
reference);
return create_fontfacereference((IDWriteFactory5 *)iface, file, face_index, simulations, axis_values,
axis_values_count, reference);
return create_fontfacereference(iface, file, face_index, simulations, axis_values, axis_values_count, reference);
}
static HRESULT WINAPI dwritefactory6_CreateFontResource(IDWriteFactory7 *iface, IDWriteFontFile *file,