* src/cid/cidload.c (cid_decrypt): Removed. (cid_read_subrs): Use t1_decrypt from psaux module. * src/cid/cidload.h: Updated. * src/cid/cidgload.c (cid_load_glyph): Use t1_decrypt from psaux module.
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
diff --git a/ChangeLog b/ChangeLog
index 5554089..cbab9d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2003-06-11 Werner Lemberg <wl@gnu.org>
+ * src/cid/cidload.c (cid_decrypt): Removed.
+ (cid_read_subrs): Use t1_decrypt from psaux module.
+ * src/cid/cidload.h: Updated.
+ * src/cid/cidgload.c (cid_load_glyph): Use t1_decrypt from psaux
+ module.
+
+2003-06-10 Werner Lemberg <wl@gnu.org>
+
* src/cid/cidobjs.c: Apply change 2003-05-31 from <Ron.Dev@gmx.de>.
Compute style flags.
Fix computation of root->height.
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 59c2276..9d18810 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -40,15 +40,16 @@
cid_load_glyph( T1_Decoder decoder,
FT_UInt glyph_index )
{
- CID_Face face = (CID_Face)decoder->builder.face;
- CID_FaceInfo cid = &face->cid;
- FT_Byte* p;
- FT_UInt fd_select;
- FT_Stream stream = face->root.stream;
- FT_Error error = 0;
- FT_Byte* charstring = 0;
- FT_Memory memory = face->root.memory;
- FT_ULong glyph_length = 0;
+ CID_Face face = (CID_Face)decoder->builder.face;
+ CID_FaceInfo cid = &face->cid;
+ FT_Byte* p;
+ FT_UInt fd_select;
+ FT_Stream stream = face->root.stream;
+ FT_Error error = 0;
+ FT_Byte* charstring = 0;
+ FT_Memory memory = face->root.memory;
+ FT_ULong glyph_length = 0;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -145,7 +146,7 @@
/* Decrypt only if lenIV >= 0. */
if ( decoder->lenIV >= 0 )
- cid_decrypt( charstring, glyph_length, 4330 );
+ psaux->t1_decrypt( charstring, glyph_length, 4330 );
error = decoder->funcs.parse_charstrings(
decoder, charstring + cs_offset,
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 77d76a8..1458025 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -57,24 +57,6 @@
}
- FT_LOCAL_DEF( void )
- cid_decrypt( FT_Byte* buffer,
- FT_Offset length,
- FT_UShort seed )
- {
- while ( length > 0 )
- {
- FT_Byte plain;
-
-
- plain = (FT_Byte)( *buffer ^ ( seed >> 8 ) );
- seed = (FT_UShort)( ( *buffer + seed ) * 52845U + 22719 );
- *buffer++ = plain;
- length--;
- }
- }
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -385,14 +367,15 @@
static FT_Error
cid_read_subrs( CID_Face face )
{
- CID_FaceInfo cid = &face->cid;
- FT_Memory memory = face->root.memory;
- FT_Stream stream = face->root.stream;
- FT_Error error;
- FT_Int n;
- CID_Subrs subr;
- FT_UInt max_offsets = 0;
- FT_ULong* offsets = 0;
+ CID_FaceInfo cid = &face->cid;
+ FT_Memory memory = face->root.memory;
+ FT_Stream stream = face->root.stream;
+ FT_Error error;
+ FT_Int n;
+ CID_Subrs subr;
+ FT_UInt max_offsets = 0;
+ FT_ULong* offsets = 0;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
if ( FT_NEW_ARRAY( face->subrs, cid->num_dicts ) )
@@ -462,7 +445,7 @@
len = offsets[count + 1] - offsets[count];
- cid_decrypt( subr->code[count], len, 4330 );
+ psaux->t1_decrypt( subr->code[count], len, 4330 );
}
}
diff --git a/src/cid/cidload.h b/src/cid/cidload.h
index 8fc577d..a7f4bce 100644
--- a/src/cid/cidload.h
+++ b/src/cid/cidload.h
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -40,11 +40,6 @@ FT_BEGIN_HEADER
cid_get_offset( FT_Byte** start,
FT_Byte offsize );
- FT_LOCAL( void )
- cid_decrypt( FT_Byte* buffer,
- FT_Offset length,
- FT_UShort seed );
-
FT_LOCAL( FT_Error )
cid_face_open( CID_Face face );