Accept 4 digit script tag in FcLangNormalize().

This commit is contained in:
Akira TAGOH 2017-08-22 17:47:14 +09:00
parent 651f122764
commit 5efa1137b4
1 changed files with 2 additions and 1 deletions

View File

@ -259,7 +259,8 @@ FcLangNormalize (const FcChar8 *lang)
lang);
goto bail0;
}
if (territory && (tlen < 2 || tlen > 3))
if (territory && (tlen < 2 || tlen > 3) &&
!(territory[0] == 'z' && tlen < 5))
{
fprintf (stderr, "Fontconfig warning: ignoring %s: not a valid region tag\n",
lang);