Commit b70d8a0ef614e8aa65f973a3799887606223c991

Johnson Y. Yan 2010-11-18T10:36:59

[type1] Fix matrix normalization. * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling factor.

diff --git a/ChangeLog b/ChangeLog
index 4b4988e..4499feb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
+2010-11-18  Johnson Y. Yan  <yinsen_yan@foxitsoftware.com>
+
+	[type1] Fix matrix normalization.
+
+	* src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
+	factor.
+
 2010-11-18  Werner Lemberg  <wl@gnu.org>
 
-	[type1]: Improve guard against malformed data.
+	[type1] Improve guard against malformed data.
 	Based on a patch submitted by Johnson Y. Yan
 	<yinsen_yan@foxitsoftware.com>
 
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index c7701c7..c9b6c1d 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1117,7 +1117,7 @@
       temp[2] = FT_DivFix( temp[2], temp_scale );
       temp[4] = FT_DivFix( temp[4], temp_scale );
       temp[5] = FT_DivFix( temp[5], temp_scale );
-      temp[3] = 0x10000L;
+      temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;
     }
 
     matrix->xx = temp[0];