ref: b70d8a0ef614e8aa65f973a3799887606223c991
parent: f689bf7d9f1f03a7eaf93aea14c9929e031b176f
author: Johnson Y. Yan <[email protected]>
date: Thu Nov 18 05:36:59 EST 2010
[type1] Fix matrix normalization. * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling factor.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
+2010-11-18 Johnson Y. Yan <[email protected]>
+
+ [type1] Fix matrix normalization.
+
+ * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
+ factor.
+
2010-11-18 Werner Lemberg <[email protected]>
- [type1]: Improve guard against malformed data.
+ [type1] Improve guard against malformed data.
Based on a patch submitted by Johnson Y. Yan
<[email protected]>
--- 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];