diff --git a/ChangeLog b/ChangeLog index 0fb17c230..95f68ebc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-07-31 suzuki toshiya + + cff: Cast the long variables to 32-bit for LP64 systems. + + * src/cff/cffdrivr.c (cff_get_advances): Insert + explicit cast to modify a 32-bit flag by unsigned + long constant. + + * src/cff/cffobjs.c (cff_face_init): Ditto. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings): + Replace the casts to FT_Long by the casts to FT_Int32 + for LP64 platforms. + 2009-07-31 suzuki toshiya pcf: Improve PCF_PropertyRec.value names on LP64 platforms. diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index 2ae642313..129a57ce1 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -200,7 +200,7 @@ FT_GlyphSlot slot = face->glyph; - flags |= FT_LOAD_ADVANCE_ONLY; + flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; for ( nn = 0; nn < count; nn++ ) { diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index e32d89077..d8b74fbac 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -935,18 +935,18 @@ ip += 2; } else if ( v < 247 ) - val = (FT_Long)v - 139; + val = (FT_Int32)v - 139; else if ( v < 251 ) { if ( ip >= limit ) goto Syntax_Error; - val = ( (FT_Long)v - 247 ) * 256 + *ip++ + 108; + val = ( (FT_Int32)v - 247 ) * 256 + *ip++ + 108; } else if ( v < 255 ) { if ( ip >= limit ) goto Syntax_Error; - val = -( (FT_Long)v - 251 ) * 256 - *ip++ - 108; + val = -( (FT_Int32)v - 251 ) * 256 - *ip++ - 108; } else { diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index 952881544..555f2b0b9 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -766,22 +766,22 @@ /* */ /* Compute face flags. */ /* */ - flags = FT_FACE_FLAG_SCALABLE | /* scalable outlines */ - FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ - FT_FACE_FLAG_HINTER; /* has native hinter */ + flags = (FT_UInt32)( FT_FACE_FLAG_SCALABLE | /* scalable outlines */ + FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ + FT_FACE_FLAG_HINTER ); /* has native hinter */ if ( sfnt_format ) - flags |= FT_FACE_FLAG_SFNT; + flags |= (FT_UInt32)FT_FACE_FLAG_SFNT; /* fixed width font? */ if ( dict->is_fixed_pitch ) - flags |= FT_FACE_FLAG_FIXED_WIDTH; + flags |= (FT_UInt32)FT_FACE_FLAG_FIXED_WIDTH; /* XXX: WE DO NOT SUPPORT KERNING METRICS IN THE GPOS TABLE FOR NOW */ #if 0 /* kerning available? */ if ( face->kern_pairs ) - flags |= FT_FACE_FLAG_KERNING; + flags |= (FT_UInt32)FT_FACE_FLAG_KERNING; #endif cffface->face_flags = flags;