Commit 3188a3a112b7448f2cb7c48d7c3ecf13208d70e0

David Turner 2000-02-13T13:34:18

Sorry, forgot some changes needed to get rid of t1encode.[hc]. Here they come..

diff --git a/src/type1/rules.mk b/src/type1/rules.mk
index 794ea0a..dba40a2 100644
--- a/src/type1/rules.mk
+++ b/src/type1/rules.mk
@@ -101,7 +101,6 @@ T1_DRV_SRC := $(T1_DIR_)t1objs.c    \
               $(T1_DIR_)t1parse.c   \
               $(T1_DIR_)t1tokens.c  \
               $(T1_DIR_)t1driver.c  \
-	          $(T1_DIR_)t1encode.c  \
               $(T1_DIR_)t1hinter.c  \
               $(T1_DIR_)t1afm.c     \
               $(T1_DIR_)t1gload.c
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index f129d47..486e03c 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -435,8 +435,8 @@
     sizeof( T1_GlyphSlotRec ),
     
     "type1",
-    1,
-    2,
+    100,
+    200,
 
     0,   /* format interface */
 
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 3798703..a24cfb9 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -17,7 +17,6 @@
 
 #include <t1gload.h>
 #include <ftdebug.h>
-#include <t1encode.h>
 #include <ftstream.h>
 
 #ifndef T1_CONFIG_OPTION_DISABLE_HINTER
@@ -182,14 +181,16 @@
   T1_Int    lookup_glyph_by_stdcharcode( T1_Face  face,
                                          T1_Int   charcode )
   {
-    T1_Int            n;
-    const T1_String*  glyph_name;
+    T1_Int              n;
+    const T1_String*    glyph_name;
+    PSNames_Interface*  psnames = (PSNames_Interface*)face->psnames;
     
     /* check range of standard char code */
     if (charcode < 0 || charcode > 255)
       return -1;
       
-    glyph_name = t1_standard_strings[t1_standard_encoding[charcode]];
+    glyph_name = psnames->adobe_std_strings(
+                    psnames->adobe_std_encoding[charcode]);
     
     for ( n = 0; n < face->type1.num_glyphs; n++ )
     {
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index d8971cc..13e3418 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1,7 +1,6 @@
 #include <ftdebug.h>
 
 #include <t1types.h>
-#include <t1encode.h>
 #include <t1tokens.h>
 #include <t1config.h>
 #include <t1parse.h>
@@ -985,6 +984,7 @@
     T1_Font*   type1      = &face->type1;
     FT_Memory  memory     = face->root.memory;
     T1_Table*  strings    = &parser->table;
+    PSNames_Interface*  psnames    = (PSNames_Interface*)face->psnames;
 	T1_Int     num_glyphs;
 	T1_Int     n;
 	T1_Error   error;
@@ -1010,6 +1010,12 @@
 	FREE( strings->elements );
 	FREE( strings->lengths );
 
+    if (!psnames)
+    {
+      FT_ERROR(( "T1.Parse.Finalise : PSNames module missing !!\n" ));
+      return T1_Err_Unimplemented_Feature;
+    }
+
 	/* Compute encoding if required. */
 	if (parser->encoding_type == t1_encoding_none)
     {
@@ -1033,13 +1039,13 @@
 		switch (parser->encoding_type)
 		{
 		  case t1_encoding_standard:
-			  index = t1_standard_encoding[n];
-			  names = (T1_String**)t1_standard_strings;
+			  index = psnames->adobe_std_encoding[n];
+			  names = 0;
 			  break;
 
 		  case t1_encoding_expert:
-			  index = t1_expert_encoding[n];
-			  names = (T1_String**)t1_standard_strings;
+			  index = psnames->adobe_expert_encoding[n];
+			  names = 0;
 			  break;
 
 		  default:
@@ -1049,7 +1055,12 @@
 		encode->char_index[n] = 0;
 		if (index)
 		{
-		  T1_String*  name = names[index];
+		  T1_String*  name;
+
+          if (names)
+            name = names[index];
+          else
+            name = (T1_String*)psnames->adobe_std_strings(index);
 
 		  if ( name )
 		  {