* src/sfnt/ttcmap.c: Fix for empty sub-headers in Dynalab fonts
diff --git a/ChangeLog b/ChangeLog
index 3313ab2..c72ebac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of
+ sub-header when its code_count is 0. Many Japanese Dynalab fonts
+ include such empty sub-header (code_count == 0, first_code == 0
+ delta == 0, but offset != 0 ) as the second sub-header in SJIS
+ cmap.
+
2008-08-04 Werner Lemberg <wl@gnu.org>
* src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 21387b5..1b5cf69 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -328,6 +328,10 @@
delta = TT_NEXT_SHORT( p );
offset = TT_NEXT_USHORT( p );
+ /* many Dynalab fonts have empty sub-header */
+ if ( 0 == code_count )
+ continue;
+
/* check range within 0..255 */
if ( valid->level >= FT_VALIDATE_PARANOID )
{