* 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
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_