Commit 912e174c662043672f18d52bbec09fa80a1f2d42

Werner Lemberg 2018-10-07T09:28:52

A missing Unicode cmap is not a fatal error. This is a follow-up to the previous commit. * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Implement it.

diff --git a/ChangeLog b/ChangeLog
index 6791658..8d9c71b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2018-10-07  Werner Lemberg  <wl@gnu.org>
 
+	A missing Unicode cmap is not a fatal error.
+
+	This is a follow-up to the previous commit.
+
+	* src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
+	(sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
+	src/type42/t42objs.c (T42_Face_Init): Implement it.
+
+2018-10-07  Werner Lemberg  <wl@gnu.org>
+
 	Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794).
 
 	* src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 9c27b52..90de7f8 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -1072,7 +1072,8 @@
         error = FT_CMap_New( &cff_cmap_unicode_class_rec, NULL,
                              &cmaprec, NULL );
         if ( error                                      &&
-             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
+             FT_ERR_NEQ( error, Unimplemented_Feature ) )
           goto Exit;
         error = FT_Err_Ok;
 
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index a54335d..375f35e 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -1531,7 +1531,8 @@
           error = FT_CMap_New( (FT_CMap_Class)&tt_cmap_unicode_class_rec,
                                NULL, &cmaprec, NULL );
           if ( error                                      &&
-               FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+               FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
+               FT_ERR_NEQ( error, Unimplemented_Feature ) )
             goto Exit;
           error = FT_Err_Ok;
 
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 6cc5ff9..ac90709 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -526,7 +526,8 @@
 
         error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
         if ( error                                      &&
-             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
+             FT_ERR_NEQ( error, Unimplemented_Feature ) )
           goto Exit;
         error = FT_Err_Ok;
 
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 0b265ce..991f604 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -354,7 +354,8 @@
 
         error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
         if ( error                                      &&
-             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
+             FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
+             FT_ERR_NEQ( error, Unimplemented_Feature ) )
           goto Exit;
         error = FT_Err_Ok;