Commit 4215984d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Use IDWriteFactory7 for fontface reference object.

parent 7e665fd2
...@@ -262,7 +262,7 @@ extern void release_system_fontfallback(IDWriteFontFallback1 *fallback) DECLSPEC ...@@ -262,7 +262,7 @@ extern void release_system_fontfallback(IDWriteFontFallback1 *fallback) DECLSPEC
extern HRESULT create_fontfallback_builder(IDWriteFactory5*,IDWriteFontFallbackBuilder**) DECLSPEC_HIDDEN; 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, extern HRESULT create_matching_font(IDWriteFontCollection*,const WCHAR*,DWRITE_FONT_WEIGHT,DWRITE_FONT_STYLE,DWRITE_FONT_STRETCH,
IDWriteFont**) DECLSPEC_HIDDEN; 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, DWRITE_FONT_SIMULATIONS simulations, DWRITE_FONT_AXIS_VALUE const *axis_values, UINT32 axis_values_count,
IDWriteFontFaceReference1 **reference) DECLSPEC_HIDDEN; IDWriteFontFaceReference1 **reference) DECLSPEC_HIDDEN;
extern HRESULT factory_get_cached_fontface(IDWriteFactory5*,IDWriteFontFile*const*,UINT32,DWRITE_FONT_SIMULATIONS, extern HRESULT factory_get_cached_fontface(IDWriteFactory5*,IDWriteFontFile*const*,UINT32,DWRITE_FONT_SIMULATIONS,
......
...@@ -233,7 +233,7 @@ struct dwrite_fontfacereference ...@@ -233,7 +233,7 @@ struct dwrite_fontfacereference
USHORT simulations; USHORT simulations;
DWRITE_FONT_AXIS_VALUE *axis_values; DWRITE_FONT_AXIS_VALUE *axis_values;
UINT32 axis_values_count; UINT32 axis_values_count;
IDWriteFactory5 *factory; IDWriteFactory7 *factory;
}; };
struct dwrite_fontresource struct dwrite_fontresource
...@@ -6082,7 +6082,7 @@ static ULONG WINAPI fontfacereference_Release(IDWriteFontFaceReference1 *iface) ...@@ -6082,7 +6082,7 @@ static ULONG WINAPI fontfacereference_Release(IDWriteFontFaceReference1 *iface)
if (!refcount) if (!refcount)
{ {
IDWriteFontFile_Release(reference->file); IDWriteFontFile_Release(reference->file);
IDWriteFactory5_Release(reference->factory); IDWriteFactory7_Release(reference->factory);
heap_free(reference->axis_values); heap_free(reference->axis_values);
heap_free(reference); heap_free(reference);
} }
...@@ -6116,7 +6116,7 @@ static HRESULT WINAPI fontfacereference_CreateFontFaceWithSimulations(IDWriteFon ...@@ -6116,7 +6116,7 @@ static HRESULT WINAPI fontfacereference_CreateFontFaceWithSimulations(IDWriteFon
if (FAILED(hr)) if (FAILED(hr))
return 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); simulations, &fontface);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
...@@ -6182,7 +6182,7 @@ static HRESULT WINAPI fontfacereference_GetFontFile(IDWriteFontFaceReference1 *i ...@@ -6182,7 +6182,7 @@ static HRESULT WINAPI fontfacereference_GetFontFile(IDWriteFontFaceReference1 *i
if (FAILED(hr)) if (FAILED(hr))
return 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); IDWriteFontFileLoader_Release(loader);
return hr; return hr;
...@@ -6295,7 +6295,7 @@ static const IDWriteFontFaceReference1Vtbl fontfacereferencevtbl = ...@@ -6295,7 +6295,7 @@ static const IDWriteFontFaceReference1Vtbl fontfacereferencevtbl =
fontfacereference1_GetFontAxisValues, 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, DWRITE_FONT_SIMULATIONS simulations, DWRITE_FONT_AXIS_VALUE const *axis_values, UINT32 axis_values_count,
IDWriteFontFaceReference1 **ret) IDWriteFontFaceReference1 **ret)
{ {
...@@ -6314,7 +6314,7 @@ HRESULT create_fontfacereference(IDWriteFactory5 *factory, IDWriteFontFile *file ...@@ -6314,7 +6314,7 @@ HRESULT create_fontfacereference(IDWriteFactory5 *factory, IDWriteFontFile *file
object->refcount = 1; object->refcount = 1;
object->factory = factory; object->factory = factory;
IDWriteFactory5_AddRef(object->factory); IDWriteFactory7_AddRef(object->factory);
object->file = file; object->file = file;
IDWriteFontFile_AddRef(object->file); IDWriteFontFile_AddRef(object->file);
object->index = index; object->index = index;
......
...@@ -1443,8 +1443,7 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference_(IDWriteFactory7 *i ...@@ -1443,8 +1443,7 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference_(IDWriteFactory7 *i
{ {
TRACE("%p, %p, %u, %x, %p.\n", iface, file, index, simulations, reference); TRACE("%p, %p, %u, %x, %p.\n", iface, file, index, simulations, reference);
return create_fontfacereference((IDWriteFactory5 *)iface, file, index, simulations, NULL, 0, return create_fontfacereference(iface, file, index, simulations, NULL, 0, (IDWriteFontFaceReference1 **)reference);
(IDWriteFontFaceReference1 **)reference);
} }
static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *iface, WCHAR const *path, static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *iface, WCHAR const *path,
...@@ -1463,8 +1462,7 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *if ...@@ -1463,8 +1462,7 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *if
return hr; return hr;
} }
hr = create_fontfacereference((IDWriteFactory5 *)iface, file, index, simulations, NULL, 0, hr = create_fontfacereference(iface, file, index, simulations, NULL, 0, (IDWriteFontFaceReference1 **)reference);
(IDWriteFontFaceReference1 **)reference);
IDWriteFontFile_Release(file); IDWriteFontFile_Release(file);
return hr; return hr;
} }
...@@ -1664,8 +1662,7 @@ static HRESULT WINAPI dwritefactory6_CreateFontFaceReference(IDWriteFactory7 *if ...@@ -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, TRACE("%p, %p, %u, %#x, %p, %u, %p.\n", iface, file, face_index, simulations, axis_values, axis_values_count,
reference); reference);
return create_fontfacereference((IDWriteFactory5 *)iface, file, face_index, simulations, axis_values, return create_fontfacereference(iface, file, face_index, simulations, axis_values, axis_values_count, reference);
axis_values_count, reference);
} }
static HRESULT WINAPI dwritefactory6_CreateFontResource(IDWriteFactory7 *iface, IDWriteFontFile *file, static HRESULT WINAPI dwritefactory6_CreateFontResource(IDWriteFactory7 *iface, IDWriteFontFile *file,
......
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