Commit 23c2ef2f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Implement HasKerningPairs().

parent 2933e866
......@@ -162,6 +162,7 @@ extern BOOL freetype_is_monospaced(IDWriteFontFace2*) DECLSPEC_HIDDEN;
extern HRESULT freetype_get_glyph_outline(IDWriteFontFace2*,FLOAT,UINT16,USHORT,struct glyph_outline**) DECLSPEC_HIDDEN;
extern UINT16 freetype_get_glyphcount(IDWriteFontFace2*) DECLSPEC_HIDDEN;
extern UINT16 freetype_get_glyphindex(IDWriteFontFace2*,UINT32) DECLSPEC_HIDDEN;
extern BOOL freetype_has_kerning_pairs(IDWriteFontFace2*) DECLSPEC_HIDDEN;
/* Glyph shaping */
enum SCRIPT_JUSTIFY
......
......@@ -669,8 +669,8 @@ static HRESULT WINAPI dwritefontface1_GetKerningPairAdjustments(IDWriteFontFace2
static BOOL WINAPI dwritefontface1_HasKerningPairs(IDWriteFontFace2 *iface)
{
struct dwrite_fontface *This = impl_from_IDWriteFontFace2(iface);
FIXME("(%p): stub\n", This);
return FALSE;
TRACE("(%p)\n", This);
return freetype_has_kerning_pairs(iface);
}
static HRESULT WINAPI dwritefontface1_GetRecommendedRenderingMode(IDWriteFontFace2 *iface,
......
......@@ -407,6 +407,19 @@ UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint)
return glyph;
}
BOOL freetype_has_kerning_pairs(IDWriteFontFace2 *fontface)
{
BOOL has_kerning_pairs = FALSE;
FT_Face face;
EnterCriticalSection(&freetype_cs);
if (pFTC_Manager_LookupFace(cache_manager, fontface, &face) == 0)
has_kerning_pairs = FT_HAS_KERNING(face);
LeaveCriticalSection(&freetype_cs);
return has_kerning_pairs;
}
#else /* HAVE_FREETYPE */
BOOL init_freetype(void)
......@@ -448,4 +461,9 @@ UINT16 freetype_get_glyphindex(IDWriteFontFace2 *fontface, UINT32 codepoint)
return 0;
}
BOOL freetype_has_kerning_pairs(IDWriteFontFace2 *fontface)
{
return FALSE;
}
#endif /* HAVE_FREETYPE */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment