Commit 085bc6e2b27297ea55a5b6d64a1425c7cd649385

David Turner 2007-03-05T17:40:03

fix bug in the PFM parser: kerning values must be read as 16-bit *signed* values

diff --git a/ChangeLog b/ChangeLog
index 8b3631b..7d085af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-05  David Turner  <david@freetype.org>
+
+	* src/type1/t1afm.c (T1_Read_PFM): bug fix: read the kerning values
+	as 16-bit *signed* values, not unsigned ones.
+
 2007-02-21  David Turner  <david@freetype.org>
 
 	* src/pshinter/pshalgo.c (psh_hint_align): Fix a bug in the hinting
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 373848b..b81a8df 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -193,7 +193,7 @@
       kp->index1 = FT_Get_Char_Index( t1_face, p[0] );
       kp->index2 = FT_Get_Char_Index( t1_face, p[1] );
 
-      kp->x = (FT_Int)FT_PEEK_USHORT_LE(p + 2);
+      kp->x = (FT_Int)FT_PEEK_SHORT_LE(p + 2);
       kp->y = 0;
 
       kp++;