shithub: freetype+ttf2subf

Download patch

ref: 8539915d1873169cc419cc5931dac8dbe6e6d04c
parent: 58b61b6e05597112f8673e5ab9bd175f59e2db5e
author: Werner Lemberg <[email protected]>
date: Tue Oct 13 16:43:19 EDT 2015

[type1] Correctly handle missing MM axis names (#46202).

* src/type1/t1load.c (T1_Get_MM_Var): Implement it.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-10-13  Werner Lemberg  <[email protected]>
 
+	[type1] Correctly handle missing MM axis names (#46202).
+
+	* src/type1/t1load.c (T1_Get_MM_Var): Implement it.
+
+2015-10-13  Werner Lemberg  <[email protected]>
+
 	[pcf] Quickly exit if font index < 0.
 
 	Similar to other font formats, this commit makes the parser no
--- 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 )