shithub: freetype+ttf2subf

Download patch

ref: a229540280f53b41c7a82d251b7497b8eb9c91f2
parent: 06fceb3f39a5eac9c8ae1ed9bb3f1cb957074a94
author: Suzuki, Toshiya (鈴木俊哉) <[email protected]>
date: Sun Apr 30 00:46:17 EDT 2006

fix bug in Mac_Read_POST_Resource()

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-04-30 suzuki toshiya <[email protected]>
+
+	Fix bug in Mac_Read_POST_Resource() to parse PFB font with MacOS
+	resource fork (bug since 2003-09-11). Patch is provided by
+	Huib-Jan Imbens <[email protected]>.
+
+	* src/base/ftobjs.c: fix pfb_pos initialization, remove extra cast
+	to copy to pfb_lenpos.
+
 2006-04-29  Werner Lemberg  <[email protected]>
 
 	Further C library abstraction.  Based on a patch from
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1255,7 +1255,7 @@
     pfb_data[3] = 0;
     pfb_data[4] = 0;
     pfb_data[5] = 0;
-    pfb_pos     = 7;
+    pfb_pos     = 6;
     pfb_lenpos  = 2;
 
     len = 0;
@@ -1288,7 +1288,7 @@
         len = rlen;
 
         pfb_data[pfb_pos++] = (FT_Byte)type;
-        pfb_lenpos          = (FT_Byte)pfb_pos;
+        pfb_lenpos          = pfb_pos;
         pfb_data[pfb_pos++] = 0;        /* 4-byte length, fill in later */
         pfb_data[pfb_pos++] = 0;
         pfb_data[pfb_pos++] = 0;