diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 9481c7468d2..92f0427d34b 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -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 diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index c4b8818df72..66dbc6852bd 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -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, diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index 84c9cad4c9a..325f1568b47 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -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 */