summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-07-03 18:01:32 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-07-03 18:01:32 +0900
commita0f7778bd4fb275c744436b9b0cc283893f1ecf8 (patch)
tree0e8917cd2a50cad0850787b1b1931cb398b88a19
parent74d4783ec11a6700fe437af528cffefcd9959106 (diff)
downloadfreetype2-a0f7778bd4fb275c744436b9b0cc283893f1ecf8.tar.gz
psaux: Handle the string length by FT_Offset variables.
-rw-r--r--ChangeLog17
-rw-r--r--src/psaux/afmparse.c22
-rw-r--r--src/psaux/afmparse.h2
3 files changed, 29 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index bd3572c76..aae3cd957 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ psaux: Handle the string length by FT_Offset variables.
+
+ * src/psaux/afmparse.c (afm_parser_next_key,
+ afm_tokenize, afm_parse_track_kern,
+ afm_parse_kern_pairs, afm_parse_kern_data,
+ afm_parser_skip_section, afm_parser_parse):
+ The length of key is handled by FT_Offset,
+ instead of FT_UInt. Although the length of
+ PostScript strings or name object is 16-bit,
+ AFM_STREAM_KEY_LEN() calculates the length
+ from the pointer difference.
+
+ * src/psaux/afmparse.h (afm_parser_next_key):
+ Ditto.
+
+2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
pcf: Fix some data types mismatching with their sources.
* src/pcf/pcfread.c (pcf_get_bitmaps): The types
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 44fe42fac..91a17e236 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -440,7 +440,7 @@
FT_LOCAL_DEF( char* )
afm_parser_next_key( AFM_Parser parser,
FT_Bool line,
- FT_UInt* len )
+ FT_Offset* len )
{
AFM_Stream stream = parser->stream;
char* key = 0; /* make stupid compiler happy */
@@ -488,7 +488,7 @@
}
if ( len )
- *len = ( key ) ? AFM_STREAM_KEY_LEN( stream, key )
+ *len = ( key ) ? (FT_Offset)AFM_STREAM_KEY_LEN( stream, key )
: 0;
return key;
@@ -497,7 +497,7 @@
static AFM_Token
afm_tokenize( const char* key,
- FT_UInt len )
+ FT_Offset len )
{
int n;
@@ -585,7 +585,7 @@
AFM_FontInfo fi = parser->FontInfo;
AFM_TrackKern tk;
char* key;
- FT_UInt len;
+ FT_Offset len;
int n = -1;
@@ -686,7 +686,7 @@
AFM_FontInfo fi = parser->FontInfo;
AFM_KernPair kp;
char* key;
- FT_UInt len;
+ FT_Offset len;
int n = -1;
@@ -774,9 +774,9 @@
static FT_Error
afm_parse_kern_data( AFM_Parser parser )
{
- FT_Error error;
- char* key;
- FT_UInt len;
+ FT_Error error;
+ char* key;
+ FT_Offset len;
while ( ( key = afm_parser_next_key( parser, 1, &len ) ) != 0 )
@@ -818,8 +818,8 @@
FT_UInt n,
AFM_Token end_section )
{
- char* key;
- FT_UInt len;
+ char* key;
+ FT_Offset len;
while ( n-- > 0 )
@@ -850,7 +850,7 @@
AFM_FontInfo fi = parser->FontInfo;
FT_Error error = PSaux_Err_Syntax_Error;
char* key;
- FT_UInt len;
+ FT_Offset len;
FT_Int metrics_sets = 0;
diff --git a/src/psaux/afmparse.h b/src/psaux/afmparse.h
index 7772dc79d..de2a530b2 100644
--- a/src/psaux/afmparse.h
+++ b/src/psaux/afmparse.h
@@ -77,7 +77,7 @@ FT_BEGIN_HEADER
FT_LOCAL( char* )
afm_parser_next_key( AFM_Parser parser,
FT_Bool line,
- FT_UInt* len );
+ FT_Offset* len );
FT_END_HEADER