* 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.
This commit is contained in:
parent
7e10ee403c
commit
27695e5dbf
16
ChangeLog
16
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>
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue