shithub: freetype+ttf2subf

Download patch

ref: 58cb3593358d50d05bb4025f7df378cb2587c015
parent: 1e89d15a2708f98cacb95ec8a0f1386adf062a64
author: suzuki toshiya <[email protected]>
date: Sat Apr 30 20:47:43 EDT 2011

[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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2011-04-30  suzuki toshiya  <[email protected]>
 
+	[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  <[email protected]>
+
 	[truetype] Register a set of tricky fonts, NEC FA family.
 
 	* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids):
--- 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;