* src/type1/t1load.c (parse_subrs, parse_charstrings): Use decrypt function from PSAux module. * src/type1/t1parse.c (T1_Done_Parse): Renamed to... (T1_Finalize_Parser): New function (to avoid name clash with a function in the PSAux module). (T1_Decrypt): Removed since it it duplicated in the PSAux module. (T1_Get_Private_Dict): Added `psaux' as new parameter; use decrypt function from PSAux module. * src/type1/t1parse.h: Adapted.
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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
diff --git a/ChangeLog b/ChangeLog
index 7b8eadf..0ae7f05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-11-23 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs, parse_charstrings): Use decrypt
+ function from PSAux module.
+
+ * src/type1/t1parse.c (T1_Done_Parse): Renamed to...
+ (T1_Finalize_Parser): New function (to avoid name clash with a
+ function in the PSAux module).
+ (T1_Decrypt): Removed since it it duplicated in the PSAux module.
+ (T1_Get_Private_Dict): Added `psaux' as new parameter; use decrypt
+ function from PSAux module.
+
+ * src/type1/t1parse.h: Adapted.
+
2000-11-22 Tom Kacvinsky <tjk@ams.org>
* src/cff/t2objs.c (T2_Init_Face): For pure CFF fonts, set
@@ -56,8 +70,10 @@
* builds/cygwin/freetype-config.in, builds/unix/freetype-config.in:
Move test down for empty --exec-prefix.
Fix --version.
+
* builds/cygwin/install.mk, builds/unix/install.mk: Use
$(INSTALL_SCRIPT) for installation of freetype-config.
+
* builds/cygwin/install.mk: Fix clean target names.
2000-11-09 David Turner <david@freetype.org>
diff --git a/src/cff/t2objs.c b/src/cff/t2objs.c
index e2958a5..c1d3f77 100644
--- a/src/cff/t2objs.c
+++ b/src/cff/t2objs.c
@@ -375,6 +375,7 @@
{
CFF_Font_Dict* dict = &cff->top_font.font_dict;
+
/* we need the `PSNames' module for pure-CFF and CEF formats */
if ( !psnames )
{
@@ -396,9 +397,9 @@
/* set global bbox, as well as EM size */
root->units_per_EM = 1000;
- root->bbox = dict->font_bbox;
- root->ascender = (FT_Short)root->bbox.yMax;
- root->descender = (FT_Short)root->bbox.yMin;
+ root->bbox = dict->font_bbox;
+ root->ascender = (FT_Short)root->bbox.yMax;
+ root->descender = (FT_Short)root->bbox.yMin;
/* retrieve font family & style name */
root->family_name = T2_Get_Name( &cff->name_index, face_index );
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 4c8e335..06381bc 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1148,7 +1148,7 @@
/* */
if ( face->type1.private_dict.lenIV >= 0 )
{
- T1_Decrypt( base, size, 4330 );
+ psaux->t1_decrypt( base, size, 4330 );
size -= face->type1.private_dict.lenIV;
base += face->type1.private_dict.lenIV;
}
@@ -1268,7 +1268,7 @@
if ( face->type1.private_dict.lenIV >= 0 )
{
- T1_Decrypt( base, size, 4330 );
+ psaux->t1_decrypt( base, size, 4330 );
size -= face->type1.private_dict.lenIV;
base += face->type1.private_dict.lenIV;
}
@@ -1567,7 +1567,7 @@
T1_Release_Table( &loader->subrs );
/* finalize parser */
- T1_Done_Parser( parser );
+ T1_Finalize_Parser( parser );
}
@@ -1599,7 +1599,7 @@
if ( error )
goto Exit;
- error = T1_Get_Private_Dict( parser );
+ error = T1_Get_Private_Dict( parser, psaux );
if ( error )
goto Exit;
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index 75edd6a..97a14ab 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -236,7 +236,7 @@
FT_LOCAL_DEF
- void T1_Done_Parser( T1_ParserRec* parser )
+ void T1_Finalize_Parser( T1_ParserRec* parser )
{
FT_Memory memory = parser->root.memory;
@@ -276,25 +276,8 @@
FT_LOCAL_DEF
- void T1_Decrypt( FT_Byte* buffer,
- FT_Int length,
- FT_UShort seed )
- {
- while ( length > 0 )
- {
- FT_Byte plain;
-
-
- plain = ( *buffer ^ ( seed >> 8 ) );
- seed = ( *buffer + seed ) * 52845 + 22719;
- *buffer++ = plain;
- length--;
- }
- }
-
-
- FT_LOCAL_DEF
- FT_Error T1_Get_Private_Dict( T1_ParserRec* parser )
+ FT_Error T1_Get_Private_Dict( T1_ParserRec* parser,
+ PSAux_Interface* psaux )
{
FT_Stream stream = parser->stream;
FT_Memory memory = parser->root.memory;
@@ -473,7 +456,7 @@
}
/* we now decrypt the encoded binary private dictionary */
- T1_Decrypt( parser->private_dict, parser->private_len, 55665 );
+ psaux->t1_decrypt( parser->private_dict, parser->private_len, 55665 );
parser->root.base = parser->private_dict;
parser->root.cursor = parser->private_dict;
parser->root.limit = parser->root.cursor + parser->private_len;
diff --git a/src/type1/t1parse.h b/src/type1/t1parse.h
index 5d53a9f..f114e77 100644
--- a/src/type1/t1parse.h
+++ b/src/type1/t1parse.h
@@ -118,15 +118,11 @@
PSAux_Interface* psaux );
FT_LOCAL
- FT_Error T1_Get_Private_Dict( T1_ParserRec* parser );
+ FT_Error T1_Get_Private_Dict( T1_ParserRec* parser,
+ PSAux_Interface* psaux );
FT_LOCAL
- void T1_Decrypt( FT_Byte* buffer,
- FT_Int length,
- FT_UShort seed );
-
- FT_LOCAL
- void T1_Done_Parser( T1_ParserRec* parser );
+ void T1_Finalize_Parser( T1_ParserRec* parser );
#ifdef __cplusplus