summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnson Y. Yan <yinsen_yan@foxitsoftware.com>2010-11-18 10:36:59 +0100
committerWerner Lemberg <wl@gnu.org>2010-11-18 10:36:59 +0100
commitb70d8a0ef614e8aa65f973a3799887606223c991 (patch)
treefec7f36a2fd6460e74bfb7d66100a59b5c738613
parentf689bf7d9f1f03a7eaf93aea14c9929e031b176f (diff)
downloadfreetype2-b70d8a0ef614e8aa65f973a3799887606223c991.tar.gz
[type1] Fix matrix normalization.
* src/type1/t1load.c (parse_font_matrix): Handle sign of scaling factor.
-rw-r--r--ChangeLog9
-rw-r--r--src/type1/t1load.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b4988e2d..4499feb11 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 c7701c77f..c9b6c1d0a 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];