[type1] Fix matrix normalization.

* src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
factor.
This commit is contained in:
Johnson Y. Yan 2010-11-18 10:36:59 +01:00 committed by Werner Lemberg
parent f689bf7d9f
commit b70d8a0ef6
2 changed files with 9 additions and 2 deletions

View File

@ -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>

View File

@ -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];