freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] [PATCH] Always check the checksum to identify tricky fonts


From: Kan-Ru Chen
Subject: [ft-devel] [PATCH] Always check the checksum to identify tricky fonts
Date: Sat, 23 Apr 2011 18:27:36 +0800

Some PDF generators mangle the family name badly, so always check
the checksum to avoid them slipping through the net.

* src/truetype/ttobjs.c (tt_check_trickyness): Check checksum even
if family_name was defined.
---

This will check not only sfnt fonts but also truetype fonts, so the
function name `tt_check_trickyness_sfnt_ids' and the comments may need
to change. But I'm not familiar with font formats/tables so this is
left to you to decide how to change the names.

 ChangeLog             |   10 ++++++++++
 src/truetype/ttobjs.c |    4 ----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 09be153..a40e0b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-04-23  Kan-Ru Chen  <address@hidden>
+
+       Always check the checksum to identify tricky fonts
+
+       Some PDF generators mangle the family name badly, so always check
+       the checksum to avoid them slipping through the net.
+
+       * src/truetype/ttobjs.c (tt_check_trickyness): Check checksum even
+       if family_name was defined.
+
 2011-04-11  Kan-Ru Chen  <address@hidden>
 
        Fix reading of signed integers from files on 64bit platforms.
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index f6e5f5d..0d0b326 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -334,12 +334,8 @@
 
     /* First, check the face name. */
     if ( face->family_name )
-    {
       if ( tt_check_trickyness_family( face->family_name ) )
         return TRUE;
-      else
-        return FALSE;
-    }
 
     /* Type42 fonts may lack `name' tables, we thus try to identify */
     /* tricky fonts by checking the checksums of Type42-persistent  */
-- 
1.7.4.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]