Reload MM/VF metadata for each font face in font collection
This ensures that the MM/VF metadata is the correct metadata for each font face instead of whatever happens to be in the first one in the collection.
This commit is contained in:
parent
89af138176
commit
a6a1695722
|
@ -2350,12 +2350,26 @@ skip:
|
|||
cs = NULL;
|
||||
FT_Done_Face (face);
|
||||
face = NULL;
|
||||
#ifdef HAVE_FT_DONE_MM_VAR
|
||||
FT_Done_MM_Var (ftLibrary, mm_var);
|
||||
#else
|
||||
free (mm_var);
|
||||
#endif
|
||||
mm_var = NULL;
|
||||
|
||||
face_num++;
|
||||
instance_num = set_instance_num;
|
||||
|
||||
if (FT_New_Face (ftLibrary, (const char *) file, face_num, &face))
|
||||
break;
|
||||
|
||||
num_instances = face->style_flags >> 16;
|
||||
if (num_instances && (!index_set || instance_num))
|
||||
{
|
||||
FT_Get_MM_Var (face, &mm_var);
|
||||
if (!mm_var)
|
||||
num_instances = 0;
|
||||
}
|
||||
}
|
||||
} while (!err && (!index_set || face_num == set_face_num) && face_num < num_faces);
|
||||
|
||||
|
|
Loading…
Reference in New Issue