Module: wine Branch: master Commit: 4215984d8d0a22f9a55429249f819c4e5d0c6bf3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4215984d8d0a22f9a55429249...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Dec 5 11:56:02 2019 +0300
dwrite: Use IDWriteFactory7 for fontface reference object.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 12 ++++++------ dlls/dwrite/main.c | 9 +++------ 3 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 9447c59663..ae9576d010 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -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, diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index c9f1e885d5..baf915bd17 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -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; diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index 5f30b8e4f4..a63af6c488 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -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,