shithub: freetype+ttf2subf

Download patch

ref: 7e50824288fac5a36c2938fdb3e1c949ea53f982
parent: e6b9b6bafccfc6fb0d85925f9ac444b25b351a5f
author: Werner Lemberg <[email protected]>
date: Tue Aug 1 08:44:35 EDT 2017

* src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-01  Werner Lemberg  <[email protected]>
+
+	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
+
 2017-08-01  Behdad Esfahbod  <[email protected]>
 
 	[truetype] Fix loading of named instances.
--- a/include/freetype/ftmm.h
+++ b/include/freetype/ftmm.h
@@ -178,7 +178,8 @@
   /*    strid  :: The entry in `name' table identifying this instance.     */
   /*                                                                       */
   /*    psid   :: The entry in `name' table identifying a PostScript name  */
-  /*              for this instance.  Value 0 indicates a missing entry.   */
+  /*              for this instance.  Value 0xFFFF indicates a missing     */
+  /*              entry.                                                   */
   /*                                                                       */
   typedef struct  FT_Var_Named_Style_
   {
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2165,9 +2165,11 @@
         for ( j = 0; j < fvar_head.axisCount; j++, c++ )
           *c = FT_GET_LONG();
 
-        /* valid psid values are 6 and [256;32767] */
+        /* valid psid values are 6, [256;32767], and 0xFFFF */
         if ( usePsName )
           ns->psid = FT_GET_USHORT();
+        else
+          ns->psid = 0xFFFF;
 
         ft_var_to_normalized( face,
                               fvar_head.axisCount,