diff --git a/include/freetype/internal/tfm.h b/include/freetype/internal/tfm.h index 7289e6795..895786e8a 100644 --- a/include/freetype/internal/tfm.h +++ b/include/freetype/internal/tfm.h @@ -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 ); diff --git a/src/gf/gfdrivr.h b/src/gf/gfdrivr.h index f486f973f..0dc631a0e 100644 --- a/src/gf/gfdrivr.h +++ b/src/gf/gfdrivr.h @@ -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; diff --git a/src/gf/gflib.c b/src/gf/gflib.c index 323190d61..25bb3b6bb 100644 --- a/src/gf/gflib.c +++ b/src/gf/gflib.c @@ -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" ));