From 8539915d1873169cc419cc5931dac8dbe6e6d04c Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 13 Oct 2015 20:43:19 +0200 Subject: [PATCH] [type1] Correctly handle missing MM axis names (#46202). * src/type1/t1load.c (T1_Get_MM_Var): Implement it. --- ChangeLog | 6 ++++++ src/type1/t1load.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index aa5c7b545..f9615d5a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-10-13 Werner Lemberg + + [type1] Correctly handle missing MM axis names (#46202). + + * src/type1/t1load.c (T1_Get_MM_Var): Implement it. + 2015-10-13 Werner Lemberg [pcf] Quickly exit if font index < 0. diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 01fb60fe8..4ce1e35ae 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -336,6 +336,9 @@ mmvar->axis[i].strid = ~0U; /* Does not apply */ mmvar->axis[i].tag = ~0U; /* Does not apply */ + if ( !mmvar->axis[i].name ) + continue; + if ( ft_strcmp( mmvar->axis[i].name, "Weight" ) == 0 ) mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'g', 'h', 't' ); else if ( ft_strcmp( mmvar->axis[i].name, "Width" ) == 0 )