[PATCH 1/4] dwrite: Implement IDWriteFontFaceReference::Equals()

Nikolay Sivov nsivov at codeweavers.com
Wed Apr 20 13:38:17 CDT 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/dwrite/font.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 597fb97..24ee58c 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -5390,10 +5390,18 @@ static HRESULT WINAPI fontfacereference_CreateFontFaceWithSimulations(IDWriteFon
 static BOOL WINAPI fontfacereference_Equals(IDWriteFontFaceReference *iface, IDWriteFontFaceReference *ref)
 {
     struct dwrite_fontfacereference *This = impl_from_IDWriteFontFaceReference(iface);
+    IDWriteFontFile *file;
+    BOOL ret;
 
-    FIXME("(%p)->(%p): stub\n", This, ref);
+    TRACE("(%p)->(%p)\n", This, ref);
 
-    return E_NOTIMPL;
+    if (FAILED(IDWriteFontFaceReference_GetFontFile(ref, &file)))
+        return FALSE;
+
+    ret = is_same_fontfile(This->file, file);
+    IDWriteFontFile_Release(file);
+
+    return ret;
 }
 
 static UINT32 WINAPI fontfacereference_GetFontFaceIndex(IDWriteFontFaceReference *iface)
-- 
2.8.0.rc3




More information about the wine-patches mailing list