[sfnt] Don't add instances to non-variation fonts.
* src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
This commit is contained in:
parent
dd64a6227c
commit
6342da9a8d
@ -1,3 +1,9 @@
|
||||
2017-03-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[sfnt] Don't add instances to non-variation fonts.
|
||||
|
||||
* src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
|
||||
|
||||
2017-03-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578).
|
||||
|
@ -1012,8 +1012,9 @@
|
||||
* later on. Here, we have to adjust `num_instances' accordingly.
|
||||
*/
|
||||
|
||||
if ( !( FT_ALLOC( default_values, num_axes * 2 ) ||
|
||||
FT_ALLOC( instance_values, num_axes * 2 ) ) )
|
||||
if ( ( face->variation_support & TT_FACE_FLAG_VAR_FVAR ) &&
|
||||
!( FT_ALLOC( default_values, num_axes * 2 ) ||
|
||||
FT_ALLOC( instance_values, num_axes * 2 ) ) )
|
||||
{
|
||||
/* the current stream position is 16 bytes after the table start */
|
||||
FT_ULong array_start = FT_STREAM_POS() - 16 + offset;
|
||||
|
Loading…
Reference in New Issue
Block a user