Nikolay Sivov : dwrite: Implement HasCharacter() for a fontface.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 3 11:39:44 CST 2016


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Mar  3 08:16:26 2016 +0300

dwrite: Implement HasCharacter() for a fontface.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/font.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index c57a6f3..0ebb49c 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1099,8 +1099,17 @@ static HRESULT WINAPI dwritefontface3_GetInformationalStrings(IDWriteFontFace3 *
 static BOOL WINAPI dwritefontface3_HasCharacter(IDWriteFontFace3 *iface, UINT32 ch)
 {
     struct dwrite_fontface *This = impl_from_IDWriteFontFace3(iface);
-    FIXME("(%p)->(0x%x): stub\n", This, ch);
-    return FALSE;
+    UINT16 index;
+    HRESULT hr;
+
+    TRACE("(%p)->(0x%08x)\n", This, ch);
+
+    index = 0;
+    hr = IDWriteFontFace3_GetGlyphIndices(iface, &ch, 1, &index);
+    if (FAILED(hr))
+        return FALSE;
+
+    return index != 0;
 }
 
 static HRESULT WINAPI dwritefontface3_GetRecommendedRenderingMode(IDWriteFontFace3 *iface, FLOAT emsize, FLOAT dpi_x, FLOAT dpi_y,




More information about the wine-cvs mailing list