cff: Cast the long variables to 32-bit for LP64 systems.

This commit is contained in:
suzuki toshiya 2009-07-03 18:01:26 +09:00
parent cf37b538d8
commit 885d4ff7a3
4 changed files with 24 additions and 10 deletions

View File

@ -1,3 +1,17 @@
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
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-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
pcf: Improve PCF_PropertyRec.value names on LP64 platforms.

View File

@ -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++ )
{

View File

@ -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
{

View File

@ -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;