[PATCH 2/2] dwrite: Implement HasCharacter() for a fontface
Nikolay Sivov
nsivov at codeweavers.com
Wed Mar 2 23:16:26 CST 2016
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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,
--
2.7.0
More information about the wine-patches
mailing list