Commit 83da52b4cd4ceef835bd437d34fe5f9dcf8fed19

Werner Lemberg 2003-12-20T07:30:05

* src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 32. For example, the Japanese Hiragino font already contains 15 subfonts. * src/cff/cffload.c (cff_font_load): Deallocate `sids' array for CID-keyed fonts.

diff --git a/ChangeLog b/ChangeLog
index 7c6d220..3f12632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-12-19  Werner Lemberg  <wl@gnu.org>
+
+	* src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 32.  For
+	example, the Japanese Hiragino font already contains 15 subfonts.
+
+	* src/cff/cffload.c (cff_font_load): Deallocate `sids' array for
+	CID-keyed fonts.
+
 2003-12-18  Werner Lemberg  <wl@gnu.org>
 
 	* include/freetype/ttnameid.h (TT_ADOBE_ID_LATIN_1): New macro.
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index a905b84..4b214c4 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -663,6 +663,8 @@
       CFF_Font cff = (CFF_Font)(face->extra.data);
 
 
+      /* XXX: What about CID-keyed fonts? */
+
       bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
       achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar );
     }
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index f63d7fd..d77959d 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -2267,6 +2267,9 @@
         if ( error )
           goto Exit;
       }
+      else
+        /* CID-keyed fonts only need CIDs */
+        FT_FREE( font->charset.sids );
     }
 
     /* get the font name (/CIDFontName for CID-keyed fonts, */
diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h
index 4508d98..9ddc663 100644
--- a/src/cff/cfftypes.h
+++ b/src/cff/cfftypes.h
@@ -199,7 +199,7 @@ FT_BEGIN_HEADER
 
 
   /* maximum number of sub-fonts in a CID-keyed file */
-#define CFF_MAX_CID_FONTS  16
+#define CFF_MAX_CID_FONTS  32
 
 
   typedef struct  CFF_FontRec_