shithub: freetype+ttf2subf

Download patch

ref: f353a38e87a894a0a3280f5e27278831a1a2aaad
parent: 10e2bb8b3deb85859c0dd254804959826f3be2ed
author: Werner Lemberg <[email protected]>
date: Sun Mar 29 10:47:49 EDT 2015

[cff] Fix Savannah bug #44629.

* src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
(CFF_MAX_SUBRS_CALLS): Set to 16.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2015-03-29  Werner Lemberg  <[email protected]>
 
+	[cff] Fix Savannah bug #44629.
+
+	* src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
+	(CFF_MAX_SUBRS_CALLS): Set to 16.
+
+2015-03-29  Werner Lemberg  <[email protected]>
+
 	[type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
 
 	This commit allows `num_coords' to be larger or smaller than the
--- a/src/cff/cf2font.h
+++ b/src/cff/cf2font.h
@@ -48,7 +48,12 @@
 
 
 #define CF2_OPERAND_STACK_SIZE  48
-#define CF2_MAX_SUBR            10 /* maximum subroutine nesting */
+#define CF2_MAX_SUBR            16 /* maximum subroutine nesting;         */
+                                   /* only 10 are allowed but there exist */
+                                   /* fonts like `HiraKakuProN-W3.ttf'    */
+                                   /* (Hiragino Kaku Gothic ProN W3;      */
+                                   /* 8.2d6e1; 2014-12-19) that exceed    */
+                                   /* this limit                          */
 
 
   /* typedef is in `cf2glue.h' */
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -29,7 +29,12 @@
 
 
 #define CFF_MAX_OPERANDS        48
-#define CFF_MAX_SUBRS_CALLS     32
+#define CFF_MAX_SUBRS_CALLS     16  /* maximum subroutine nesting;         */
+                                    /* only 10 are allowed but there exist */
+                                    /* fonts like `HiraKakuProN-W3.ttf'    */
+                                    /* (Hiragino Kaku Gothic ProN W3;      */
+                                    /* 8.2d6e1; 2014-12-19) that exceed    */
+                                    /* this limit                          */
 #define CFF_MAX_TRANS_ELEMENTS  32