* src/cff/cffobjs.c (cff_face_init): A CFF within an SFNT can have only a single font. This is undocumented but has been verified on the opentype list.
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
diff --git a/ChangeLog b/ChangeLog
index c46baca..0dd7729 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-27 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): A CFF within an SFNT can have
+ only a single font. This is undocumented but has been verified on
+ the opentype list.
+
2004-12-26 Werner Lemberg <wl@gnu.org>
* Jamfile (FT2_COMPONENTS): Add `otvalid'.
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index c896dad..cd63524 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -367,6 +367,7 @@
FT_Bool pure_cff = 1;
FT_Bool sfnt_format = 0;
+
#if 0
FT_FACE_FIND_GLOBAL_SERVICE( face, sfnt, SFNT );
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
@@ -404,6 +405,14 @@
if ( face_index < 0 )
return CFF_Err_Ok;
+ /* UNDOCUMENTED! A CFF in an SFNT can have only a single font. */
+ if ( face_index > 0 )
+ {
+ FT_ERROR(( "cff_face_init: invalid face index\n" ));
+ error = CFF_Err_Invalid_Argument;
+ goto Exit;
+ }
+
sfnt_format = 1;
/* now, the font can be either an OpenType/CFF font, or an SVG CEF */