ref: a2637823db921902c95ba09a254e35375cd1664a
parent: da32d7054dc34d2f92f9f8e465d55589fe58e354
author: Suzuki, Toshiya (鈴木俊哉) <[email protected]>
date: Mon Aug 18 00:44:56 EDT 2008
* src/sfnt/ttcmap.c: Fix for empty sub-headers in Dynalab fonts
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-18 suzuki toshiya <[email protected]>
+
+ * 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 <[email protected]>
* src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes
--- 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 )
{