[varfonts] Query variable font in FcFreeTypeQueryAll()

Returns varfont pattern at the end.
This commit is contained in:
Behdad Esfahbod 2017-09-13 04:01:07 -04:00
parent 585f08715b
commit 0f9bbbcf8f
1 changed files with 4 additions and 2 deletions

View File

@ -2092,11 +2092,13 @@ FcFreeTypeQueryAll(const FcChar8 *file,
if (!set || ! FcFontSetAdd (set, pat))
FcPatternDestroy (pat);
}
else
else if (instance_num != 0x8000)
err = 1;
if (instance_num < num_instances && !set_instance_num)
if (!set_instance_num && instance_num < num_instances)
instance_num++;
else if (!set_instance_num && instance_num == num_instances)
instance_num = 0x8000; /* variable font */
else
{
face_num++;