dwrite: Return earlier from GetKerningPairAdjustments() when pair kerning is not supported.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-01-21 21:58:41 +03:00 committed by Alexandre Julliard
parent ed3b5a42be
commit eae84e7dde
1 changed files with 5 additions and 0 deletions

View File

@ -880,6 +880,11 @@ static HRESULT WINAPI dwritefontface1_GetKerningPairAdjustments(IDWriteFontFace2
return E_INVALIDARG;
}
if (!This->has_kerning_pairs) {
memset(adjustments, 0, count*sizeof(INT32));
return S_OK;
}
for (i = 0; i < count-1; i++)
adjustments[i] = freetype_get_kerning_pair_adjustment(iface, indices[i], indices[i+1]);
adjustments[count-1] = 0;