[truetype] Recalculate the sfnt table checksum always. * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate the sfnt table checksum even if non-zero value is writte in the TrueType font header. Some bad PDF generators write wrong values. For detail, see examples and benchmark tests of the latency by recalculation: http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/ChangeLog b/ChangeLog
index fe645d4..0221692 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ [truetype] Recalculate the sfnt table checksum always.
+
+ * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate
+ the sfnt table checksum even if non-zero value is writte in
+ the TrueType font header. Some bad PDF generators write
+ wrong values. For detail, see examples and benchmark tests
+ of the latency by recalculation:
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
+
+2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
[truetype] Register a set of tricky fonts, NEC FA family.
* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids):
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 11cd4b3..942361c 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -213,8 +213,10 @@
tt_get_sfnt_checksum( TT_Face face,
FT_UShort i )
{
+#if 0 /* if we believe the written value, use following part. */
if ( face->dir_tables[i].CheckSum )
return face->dir_tables[i].CheckSum;
+#endif
if ( !face->goto_table )
return 0;