Sorry, forgot some changes needed to get rid of t1encode.[hc]. Here they come..
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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
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 )
{