Fix the issue fail to obtain the style name

The number of a couple of 'family' and 'familylang' and 'style' and 'stylelang'
is different. need to reset the counter to get the property regarding to regarding to the lang.

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/303
This commit is contained in:
Akira TAGOH 2021-12-09 20:26:10 +09:00
parent ce00010b1f
commit 92fbf14b0d
1 changed files with 1 additions and 0 deletions

View File

@ -1705,6 +1705,7 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
break;
}
family[i] = 0;
n = 0;
while (FcPatternObjectGetString (pat, FC_STYLELANG_OBJECT, n, &lang) == FcResultMatch)
{
if (FcStrCmp (lang, (const FcChar8 *) "en") == 0)