Nikolay Sivov : dwrite: Forward more font methods to fontface.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 25 12:54:00 CST 2014


Module: wine
Branch: master
Commit: 7ae3426ea4198d614d2dc808d1de13799e983ba2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7ae3426ea4198d614d2dc808d1de13799e983ba2

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sat Nov 22 20:15:27 2014 +0300

dwrite: Forward more font methods to fontface.

---

 dlls/dwrite/font.c | 38 +++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index eb7a274..cef4a27 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -782,8 +782,16 @@ static DWRITE_FONT_STYLE WINAPI dwritefont_GetStyle(IDWriteFont2 *iface)
 static BOOL WINAPI dwritefont_IsSymbolFont(IDWriteFont2 *iface)
 {
     struct dwrite_font *This = impl_from_IDWriteFont2(iface);
-    FIXME("(%p): stub\n", This);
-    return FALSE;
+    IDWriteFontFace2 *fontface;
+    HRESULT hr;
+
+    TRACE("(%p)\n", This);
+
+    hr = get_fontface_from_font(This, &fontface);
+    if (FAILED(hr))
+        return hr;
+
+    return IDWriteFontFace2_IsSymbolFont(fontface);
 }
 
 static HRESULT WINAPI dwritefont_GetFaceNames(IDWriteFont2 *iface, IDWriteLocalizedStrings **names)
@@ -965,18 +973,34 @@ static HRESULT WINAPI dwritefont1_GetUnicodeRanges(IDWriteFont2 *iface, UINT32 m
     return IDWriteFontFace2_GetUnicodeRanges(fontface, max_count, ranges, count);
 }
 
-static HRESULT WINAPI dwritefont1_IsMonospacedFont(IDWriteFont2 *iface)
+static BOOL WINAPI dwritefont1_IsMonospacedFont(IDWriteFont2 *iface)
 {
     struct dwrite_font *This = impl_from_IDWriteFont2(iface);
-    FIXME("(%p): stub\n", This);
-    return FALSE;
+    IDWriteFontFace2 *fontface;
+    HRESULT hr;
+
+    TRACE("(%p)\n", This);
+
+    hr = get_fontface_from_font(This, &fontface);
+    if (FAILED(hr))
+        return hr;
+
+    return IDWriteFontFace2_IsMonospacedFont(fontface);
 }
 
 static HRESULT WINAPI dwritefont2_IsColorFont(IDWriteFont2 *iface)
 {
     struct dwrite_font *This = impl_from_IDWriteFont2(iface);
-    FIXME("(%p): stub\n", This);
-    return FALSE;
+    IDWriteFontFace2 *fontface;
+    HRESULT hr;
+
+    TRACE("(%p)\n", This);
+
+    hr = get_fontface_from_font(This, &fontface);
+    if (FAILED(hr))
+        return hr;
+
+    return IDWriteFontFace2_IsColorFont(fontface);
 }
 
 static const IDWriteFont2Vtbl dwritefontvtbl = {




More information about the wine-cvs mailing list