Commit 885f5b0b4edb0c00a48af3eabe98507cf4f94430

Werner Lemberg 2018-10-07T09:03:05

Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794). * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init): Check `unicodes_init' field.

diff --git a/ChangeLog b/ChangeLog
index 2894444..6791658 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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
+	(t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
+	Check `unicodes_init' field.
+
 2018-10-03  Werner Lemberg  <wl@gnu.org>
 
 	[ftgrays] Fix typo in stand-alone mode (#54771).
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index f7316e1..bd83601 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -161,6 +161,9 @@
     if ( !charset->sids )
       return FT_THROW( No_Unicode_Glyph_Name );
 
+    if ( !psnames->unicodes_init )
+      return FT_THROW( Unimplemented_Feature );
+
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    cff->num_glyphs,
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 0c9f916..347e804 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -305,6 +305,9 @@
     FT_UNUSED( pointer );
 
 
+    if ( !psnames->unicodes_init )
+      return FT_THROW( Unimplemented_Feature );
+
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    (FT_UInt)face->type1.num_glyphs,
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index da9d865..fda46af 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -3681,6 +3681,9 @@
     FT_UNUSED( pointer );
 
 
+    if ( !psnames->unicodes_init )
+      return FT_THROW( Unimplemented_Feature );
+
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    face->root.num_glyphs,