Signed-off-by: Brendan Shanks bshanks@codeweavers.com ---
Fixes crash in current CEF.
dlls/dwrite/font.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 19fe911420f..e1d9849a9d8 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1562,6 +1562,13 @@ static HRESULT WINAPI dwritefontface5_GetFontResource(IDWriteFontFace5 *iface, I return IDWriteFactory7_CreateFontResource(fontface->factory, fontface->files[0], fontface->index, resource); }
+static BOOL WINAPI dwritefontface5_Equals(IDWriteFontFace5 *iface, IDWriteFontFace *other) +{ + FIXME("%p, %p.\n", iface, other); + + return E_NOTIMPL; +} + static const IDWriteFontFace5Vtbl dwritefontfacevtbl = { dwritefontface_QueryInterface, @@ -1621,6 +1628,7 @@ static const IDWriteFontFace5Vtbl dwritefontfacevtbl = dwritefontface5_GetFontAxisValues, dwritefontface5_HasVariations, dwritefontface5_GetFontResource, + dwritefontface5_Equals, };
static HRESULT WINAPI dwritefontface_reference_QueryInterface(IDWriteFontFaceReference *iface, REFIID riid, void **obj)
On Wed, Aug 19, 2020 at 6:33 PM Brendan Shanks bshanks@codeweavers.com wrote:
Fixes crash in current CEF.
+static BOOL WINAPI dwritefontface5_Equals(IDWriteFontFace5 *iface, IDWriteFontFace *other) +{
- FIXME("%p, %p.\n", iface, other);
- return E_NOTIMPL;
Would `return iface == other` be good enough for CEF? That would make a lot more sense to me, since this function returns BOOL, not HRESULT.
-Alex
Sorry about that.
Since we don't support variations at the moment, it'd be good enough to duplicate what dwritefont3_Equals() does, by comparing <index, simulations, file>. It's fine to use unsafe_impl(other) and assume that there is always 1 file. Loop for file_count works too if you prefer, but formats like Type 1 that use multiple files are not meant to work.