[gf] Improve data types of some variables.

This commit is contained in:
Parth Wazurkar 2018-07-30 23:35:46 +05:30
parent 73338b9c10
commit 8302c96c83
3 changed files with 8 additions and 9 deletions

View File

@ -46,9 +46,9 @@ FT_BEGIN_HEADER
typedef struct TFM_FontInfoRec_
{
/* Font Info */
FT_ULong cs;
FT_Long cs; /* Check Sum */
/* Metrics */
FT_ULong ds;
FT_ULong ds; /* Design Size */
FT_UInt design_size;
FT_UInt slant;
FT_UInt begin_char, end_char;
@ -59,6 +59,8 @@ FT_BEGIN_HEADER
} TFM_FontInfoRec, *TFM_FontInfo;
#define RDS2PT(rds) (tfm->design_size * ((FT_Long)(rds)/(FT_Long)(1<<20)))
/*************************************************************************/
/*************************************************************************/
/***** *****/
@ -118,9 +120,6 @@ FT_BEGIN_HEADER
FT_Error
(*parse_metrics)( TFM_Parser parser );
FT_Error
(*parse_kern)( TFM_Parser parser );
void
(*done)( TFM_Parser parser );

View File

@ -43,7 +43,7 @@ FT_BEGIN_HEADER
{
FT_UInt code_min, code_max;
GF_Bitmap bm_table;
FT_UInt ds, hppp, vppp;
FT_Int ds, hppp, vppp;
FT_UInt font_bbx_w, font_bbx_h;
FT_UInt font_bbx_xoff, font_bbx_yoff;

View File

@ -317,7 +317,7 @@ FT_Byte bit_table[] = {
GF_Glyph go;
GF_Bitmap bm;
FT_Byte instr, d, pre, id, k, code;
FT_ULong ds, check_sum, hppp, vppp;
FT_Long ds, check_sum, hppp, vppp;
FT_Long min_m, max_m, min_n, max_n, w;
FT_UInt dx, dy;
FT_Long ptr_post, ptr_p, ptr, optr;
@ -334,7 +334,6 @@ FT_Byte bit_table[] = {
pre = READ_UINT1( stream );
if (pre != GF_PRE)
{
FT_ERROR(( "gf_load_font: missing GF_PRE(247) field\n" ));
error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@ -342,7 +341,6 @@ FT_Byte bit_table[] = {
id = READ_UINT1( stream );
if (id != GF_ID)
{
FT_ERROR(( "gf_load_font: missing GF_ID(131) field\n" ));
error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@ -428,6 +426,8 @@ FT_Byte bit_table[] = {
min_n = READ_INT4( stream );
max_n = READ_INT4( stream );
FT_TRACE5(( "gf_load_font: checksum is %ld\n",check_sum ));
if( ptr_p < 0 ) /* Defined to use ptr_p */
{
FT_ERROR(( "gf_load_font: invalid pointer in postamble\n" ));