ref: 27695e5dbfc176a581afee6c96948ddc0a4941f7
parent: 7e10ee403c008f0b080f5e685f16f0f828a15d00
author: Werner Lemberg <[email protected]>
date: Thu Nov 23 03:21:13 EST 2000
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-11-23 Werner Lemberg <[email protected]>
+
+ * 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 <[email protected]>
* 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 <[email protected]>
--- 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 );
--- 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;
--- 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,26 +276,9 @@
FT_LOCAL_DEF
- void T1_Decrypt( FT_Byte* buffer,
- FT_Int length,
- FT_UShort seed )
+ FT_Error T1_Get_Private_Dict( T1_ParserRec* parser,
+ PSAux_Interface* psaux )
{
- 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_Stream stream = parser->stream;
FT_Memory memory = parser->root.memory;
FT_Error error = 0;
@@ -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;
--- 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