From 73861976779a754cc9b808760cc8e6cf98d52549 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 5 Jun 2003 04:31:05 +0000 Subject: [PATCH] * include/freetype/internal/ftdriver.h, include/freetype/internal/ftobjs.h, include/freetype/internal/psaux.h, src/cid/cidgload.c, src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h, src/pshinter/pshrec.c, src/pshinter/pshalgo.c, src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c, src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c, src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c, src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h: Many casts and slight argument type changes to make it work with a 16bit compiler. --- ChangeLog | 22 ++++++++++++++++++++++ include/freetype/cache/ftcimage.h | 6 +++--- include/freetype/internal/ftdriver.h | 8 ++++---- include/freetype/internal/ftobjs.h | 2 +- include/freetype/internal/psaux.h | 8 ++++---- src/cid/cidgload.c | 11 +++++------ src/psaux/psobjs.c | 8 ++++---- src/psaux/psobjs.h | 10 +++++----- src/psaux/t1decode.c | 14 +++++++------- src/pshinter/pshalgo.c | 7 ++++--- src/pshinter/pshrec.c | 13 ++++++++----- src/psnames/psmodule.c | 4 ++-- src/raster/ftraster.c | 2 +- src/sfnt/sfobjs.c | 2 +- src/smooth/ftgrays.c | 10 +++++----- src/smooth/ftsmooth.c | 6 +++--- src/truetype/ttdriver.c | 2 +- src/truetype/ttgload.c | 28 ++++++++++++++-------------- src/truetype/ttobjs.c | 2 +- src/type1/t1afm.c | 4 ++-- src/type1/t1gload.c | 4 ++-- src/type1/t1gload.h | 4 ++-- src/type1/t1load.c | 4 ++-- src/type1/t1objs.c | 2 +- src/type42/t42parse.c | 16 ++++++++-------- src/type42/t42parse.h | 4 ++-- 26 files changed, 114 insertions(+), 89 deletions(-) diff --git a/ChangeLog b/ChangeLog index 578da91c5..8fad44ea9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2003-06-04 Wolfgang Domröse + + * include/freetype/internal/ftdriver.h, + include/freetype/internal/ftobjs.h, + include/freetype/internal/psaux.h, src/cid/cidgload.c, + src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h, + src/pshinter/pshrec.c, src/pshinter/pshalgo.c, + src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c, + src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c, + src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c, + src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c, + src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h: + Many casts and slight argument type changes to make it work with + a 16bit compiler. + +2003-06-04 Werner Lemberg + + * include/freetype/config/ftoption.h: Defining + TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING by default is a bad idea + since some fonts (e.g. Arial) produce worse results than without + hinting. Reverted. + 2003-06-04 Werner Lemberg * src/truetype/ttgload.c (load_truetype_glyph) diff --git a/include/freetype/cache/ftcimage.h b/include/freetype/cache/ftcimage.h index 382d991d3..6acbf81b6 100644 --- a/include/freetype/cache/ftcimage.h +++ b/include/freetype/cache/ftcimage.h @@ -4,7 +4,7 @@ /* */ /* FreeType Image cache (specification). */ /* */ -/* Copyright 2000-2001, 2002 by */ +/* Copyright 2000-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -208,12 +208,12 @@ FT_BEGIN_HEADER /* FTC_Image_Desc */ /* */ /* */ - /* THIS TYPE IS DEPRECATED. Use @FTC_ImageDesc instead. */ + /* THIS TYPE IS DEPRECATED. Use @FTC_ImageDescRec instead. */ /* */ /* A simple structure used to describe a given glyph image category. */ /* */ /* */ - /* size :: An @FTC_SizeRec used to describe the glyph's face */ + /* font :: An @FTC_FontRec used to describe the glyph's face */ /* and size. */ /* */ /* image_type :: The glyph image's type. */ diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h index 9323910b2..1f1c55aaa 100644 --- a/include/freetype/internal/ftdriver.h +++ b/include/freetype/internal/ftdriver.h @@ -4,7 +4,7 @@ /* */ /* FreeType font driver interface (specification). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -169,9 +169,9 @@ FT_BEGIN_HEADER { FT_Module_Class root; - FT_Int face_object_size; - FT_Int size_object_size; - FT_Int slot_object_size; + FT_Long face_object_size; + FT_Long size_object_size; + FT_Long slot_object_size; FT_Face_InitFunc init_face; FT_Face_DoneFunc done_face; diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index 9dd2beb9b..b6057db63 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -239,7 +239,7 @@ FT_BEGIN_HEADER typedef struct FT_CMap_ClassRec_ { - FT_UInt size; + FT_ULong size; FT_CMap_InitFunc init; FT_CMap_DoneFunc done; FT_CMap_CharIndexFunc char_index; diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index 7375d670a..680b4385c 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -70,10 +70,10 @@ FT_BEGIN_HEADER (*done)( PS_Table table ); FT_Error - (*add)( PS_Table table, - FT_Int index, - void* object, - FT_Int length ); + (*add)( PS_Table table, + FT_Int index, + void* object, + FT_PtrDist length ); void (*release)( PS_Table table ); diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c index 6de7fd99b..59c2276fc 100644 --- a/src/cid/cidgload.c +++ b/src/cid/cidgload.c @@ -48,7 +48,7 @@ FT_Error error = 0; FT_Byte* charstring = 0; FT_Memory memory = face->root.memory; - FT_UInt glyph_length = 0; + FT_ULong glyph_length = 0; #ifdef FT_CONFIG_OPTION_INCREMENTAL @@ -107,8 +107,7 @@ fd_select = (FT_UInt) cid_get_offset( &p, (FT_Byte)cid->fd_bytes ); off1 = (FT_ULong)cid_get_offset( &p, (FT_Byte)cid->gd_bytes ); p += cid->fd_bytes; - glyph_length = (FT_UInt) cid_get_offset( - &p, (FT_Byte)cid->gd_bytes ) - off1; + glyph_length = cid_get_offset( &p, (FT_Byte)cid->gd_bytes ) - off1; FT_FRAME_EXIT(); if ( glyph_length == 0 ) @@ -148,9 +147,9 @@ if ( decoder->lenIV >= 0 ) cid_decrypt( charstring, glyph_length, 4330 ); - error = decoder->funcs.parse_charstrings( decoder, - charstring + cs_offset, - glyph_length - cs_offset ); + error = decoder->funcs.parse_charstrings( + decoder, charstring + cs_offset, + (FT_Int)glyph_length - cs_offset ); } FT_FREE( charstring ); diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index 1de2d2b4c..7cf6b886a 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -153,10 +153,10 @@ /* reallocation fails. */ /* */ FT_LOCAL_DEF( FT_Error ) - ps_table_add( PS_Table table, - FT_Int idx, - void* object, - FT_Int length ) + ps_table_add( PS_Table table, + FT_Int idx, + void* object, + FT_PtrDist length ) { if ( idx < 0 || idx > table->max_elems ) { diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h index 9e81675bb..8b214f652 100644 --- a/src/psaux/psobjs.h +++ b/src/psaux/psobjs.h @@ -4,7 +4,7 @@ /* */ /* Auxiliary functions for PostScript fonts (specification). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -52,10 +52,10 @@ FT_BEGIN_HEADER FT_Memory memory ); FT_LOCAL( FT_Error ) - ps_table_add( PS_Table table, - FT_Int idx, - void* object, - FT_Int length ); + ps_table_add( PS_Table table, + FT_Int idx, + void* object, + FT_PtrDist length ); FT_LOCAL( void ) ps_table_done( PS_Table table ); diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index ec741ff2d..dd8719f12 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -241,8 +241,8 @@ /* subglyph 1 = accent character */ subg->index = achar_index; subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES; - subg->arg1 = adx - asb; - subg->arg2 = ady; + subg->arg1 = (FT_Int)( adx - asb ); + subg->arg2 = (FT_Int)ady; /* set up remaining glyph fields */ glyph->num_subglyphs = 2; @@ -565,7 +565,7 @@ goto Stack_Underflow; top -= 2; - switch ( top[1] ) + switch ( (FT_Int)top[1] ) { case 1: /* start flex feature */ if ( top[0] != 0 ) @@ -706,7 +706,7 @@ values = top; for ( nn = 0; nn < num_points; nn++ ) { - FT_Int tmp = values[0]; + FT_Long tmp = values[0]; for ( mm = 1; mm < blend->num_designs; mm++ ) @@ -785,8 +785,8 @@ case op_seac: /* return immediately after the processing */ - return t1operator_seac( decoder, top[0], top[1], - top[2], top[3], top[4] ); + return t1operator_seac( decoder, top[0], top[1], top[2], + (FT_Int)top[3], (FT_Int)top[4] ); case op_sbw: FT_TRACE4(( " sbw" )); @@ -945,7 +945,7 @@ FT_TRACE4(( " callsubr" )); - idx = top[0]; + idx = (FT_Int)top[0]; if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs ) { FT_ERROR(( "t1_decoder_parse_charstrings: " diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 796351e08..21e82c3c8 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -1168,8 +1168,8 @@ for ( n = 0; n < glyph->num_points; n++, point++ ) { - FT_Int n_prev = point->prev - points; - FT_Int n_next = point->next - points; + FT_Int n_prev = (FT_Int)( point->prev - points ); + FT_Int n_next = (FT_Int)( point->next - points ); FT_Pos dxi, dyi, dxo, dyo; @@ -1448,7 +1448,8 @@ for ( ; num_hints > 0; num_hints--, sort++ ) { PSH_Hint hint = sort[0]; - FT_Pos d, flag; + FT_Pos d; + FT_Int flag; if ( point->flags2 & min_flag ) diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 69cef34fb..a4b51fc28 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -861,8 +861,9 @@ FT_Memory memory = hints->memory; - error = ps_dimension_add_t1stem( dim, stems[0], stems[1], - memory, NULL ); + error = ps_dimension_add_t1stem( + dim, (FT_Int)stems[0], (FT_Int)stems[1], + memory, NULL ); if ( error ) { FT_ERROR(( "ps_hints_stem: could not add stem" @@ -917,8 +918,9 @@ /* add the three stems to our hints/masks table */ for ( count = 0; count < 3; count++, stems += 2 ) { - error = ps_dimension_add_t1stem( dim, stems[0], stems[1], - memory, &idx[count] ); + error = ps_dimension_add_t1stem( + dim, (FT_Int)stems[0], (FT_Int)stems[1], + memory, &idx[count] ); if ( error ) goto Fail; } @@ -1164,7 +1166,8 @@ FT_Int count, FT_Fixed* coords ) { - FT_Pos stems[32], y, n, total = count; + FT_Pos stems[32], y, n; + FT_Int total = count; y = 0; diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c index b2ddcb7e4..606ba74ea 100644 --- a/src/psnames/psmodule.c +++ b/src/psnames/psmodule.c @@ -4,7 +4,7 @@ /* */ /* PSNames module implementation (body). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -172,7 +172,7 @@ if ( uni_char != 0 && uni_char != 0xFFFF ) { - map->unicode = uni_char; + map->unicode = (FT_UInt)uni_char; map->glyph_index = n; map++; } diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 65b55585f..757cba758 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -917,7 +917,7 @@ /* Take care: miny-y1 can be a very large value; we use */ /* a slow MulDiv function to avoid clipping bugs */ x1 += SMulDiv( Dx, miny - y1, Dy ); - e1 = TRUNC( miny ); + e1 = (Int)TRUNC( miny ); f1 = 0; } else diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index 5eeea6e09..4dac94ba6 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -633,7 +633,7 @@ root->face_flags |= FT_FACE_FLAG_VERTICAL; } #endif - root->num_fixed_sizes = face->num_sbit_strikes; + root->num_fixed_sizes = (FT_Int)face->num_sbit_strikes; if ( FT_NEW_ARRAY( root->available_sizes, face->num_sbit_strikes ) ) goto Exit; diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 5cffbe993..499cc8cb5 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -340,7 +340,7 @@ long byte_size ) { ras.cells = (PCell)buffer; - ras.max_cells = byte_size / sizeof ( TCell ); + ras.max_cells = (int)( byte_size / sizeof ( TCell ) ); ras.num_cells = 0; ras.area = 0; ras.cover = 0; @@ -567,16 +567,16 @@ if ( ex1 != ex2 ) { - p = ONE_PIXEL * ( y2 - y1 + delta ); - lift = (TCoord)( p / dx ); - rem = (TCoord)( p % dx ); + p = ONE_PIXEL * ( y2 - y1 + delta ); + lift = (TCoord)( p / dx ); + rem = (TCoord)( p % dx ); if ( rem < 0 ) { lift--; rem += (TCoord)dx; } - mod -= dx; + mod -= (int)dx; while ( ex1 != ex2 ) { diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c index 131b17eba..004f40a28 100644 --- a/src/smooth/ftsmooth.c +++ b/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ /* */ /* Anti-aliasing renderer interface (body). */ /* */ -/* Copyright 2000-2001, 2002 by */ +/* Copyright 2000-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -137,8 +137,8 @@ cbox.xMax = ( cbox.xMax + 63 ) & -64; cbox.yMax = ( cbox.yMax + 63 ) & -64; - width = ( cbox.xMax - cbox.xMin ) >> 6; - height = ( cbox.yMax - cbox.yMin ) >> 6; + width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 ); + height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 ); bitmap = &slot->bitmap; memory = render->root.memory; diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c index df023d586..8c1e2fc11 100644 --- a/src/truetype/ttdriver.c +++ b/src/truetype/ttdriver.c @@ -115,7 +115,7 @@ while ( left <= right ) { - FT_Int middle = left + ( ( right - left ) >> 1 ); + FT_Long middle = left + ( ( right - left ) >> 1 ); FT_ULong cur_pair; diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 82ad8ab52..bab638505 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -886,7 +886,7 @@ count = 0; if ( glyph_index < (FT_UInt)face->num_locations - 1 ) - count = face->glyph_locations[glyph_index + 1] - offset; + count = (FT_UInt)( face->glyph_locations[glyph_index + 1] - offset ); } if ( count == 0 ) @@ -1184,16 +1184,16 @@ /* */ /* This algorithm is a guess and works much better than the above. */ /* */ - int mac_xscale = FT_SqrtFixed( - FT_MulFix( subglyph->transform.xx, - subglyph->transform.xx ) + - FT_MulFix( subglyph->transform.xy, - subglyph->transform.xy) ); - int mac_yscale = FT_SqrtFixed( - FT_MulFix( subglyph->transform.yy, - subglyph->transform.yy ) + - FT_MulFix( subglyph->transform.yx, - subglyph->transform.yx ) ); + FT_Fixed mac_xscale = FT_SqrtFixed( + FT_MulFix( subglyph->transform.xx, + subglyph->transform.xx ) + + FT_MulFix( subglyph->transform.xy, + subglyph->transform.xy) ); + FT_Fixed mac_yscale = FT_SqrtFixed( + FT_MulFix( subglyph->transform.yy, + subglyph->transform.yy ) + + FT_MulFix( subglyph->transform.yx, + subglyph->transform.yx ) ); x = FT_MulFix( x, mac_xscale ); @@ -1647,9 +1647,9 @@ error = sfnt->load_sbit_image( face, - size->strike_index, - glyph_index, - load_flags, + (FT_ULong)size->strike_index, + (FT_UInt)glyph_index, + (FT_Int)load_flags, stream, &glyph->bitmap, &metrics ); diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index b6869b010..9d4fb7a0d 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -760,7 +760,7 @@ strike->hori.max_width + strike->hori.min_advance_SB ) << 6; - size->strike_index = strike_index; + size->strike_index = (FT_UInt)strike_index; } else { diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index 71ccd1ea7..9945ebdf6 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -4,7 +4,7 @@ /* */ /* AFM support for Type 1 fonts (body). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -148,7 +148,7 @@ FT_ULong index2 = KERN_INDEX( pair2->glyph1, pair2->glyph2 ); - return ( index1 - index2 ); + return (int)( index1 - index2 ); } diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c index 1a98daf3c..4f46f3586 100644 --- a/src/type1/t1gload.c +++ b/src/type1/t1gload.c @@ -143,7 +143,7 @@ FT_LOCAL_DEF( FT_Error ) T1_Compute_Max_Advance( T1_Face face, - FT_Int* max_advance ) + FT_Pos* max_advance ) { FT_Error error; T1_DecoderRec decoder; @@ -185,7 +185,7 @@ if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance ) *max_advance = decoder.builder.advance.x; - /* ignore the error if one occured - skip to next glyph */ + /* ignore the error if one occurred - skip to next glyph */ } return T1_Err_Ok; diff --git a/src/type1/t1gload.h b/src/type1/t1gload.h index 0324a0d15..de87896dc 100644 --- a/src/type1/t1gload.h +++ b/src/type1/t1gload.h @@ -4,7 +4,7 @@ /* */ /* Type 1 Glyph Loader (specification). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -29,7 +29,7 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Error ) T1_Compute_Max_Advance( T1_Face face, - FT_Int* max_advance ); + FT_Pos* max_advance ); FT_LOCAL( FT_Error ) T1_Load_Glyph( T1_GlyphSlot glyph, diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 50b47db65..330146760 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1213,12 +1213,12 @@ FT_MEM_COPY( temp, base, size ); psaux->t1_decrypt( temp, size, 4330 ); size -= face->type1.private_dict.lenIV; - error = T1_Add_Table( table, idx, + error = T1_Add_Table( table, (FT_Int)idx, temp + face->type1.private_dict.lenIV, size ); FT_FREE( temp ); } else - error = T1_Add_Table( table, idx, base, size ); + error = T1_Add_Table( table, (FT_Int)idx, base, size ); if ( error ) goto Fail; } diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c index 6edb96d5b..4554c67c0 100644 --- a/src/type1/t1objs.c +++ b/src/type1/t1objs.c @@ -424,7 +424,7 @@ root->max_advance_width = (FT_Short)( root->bbox.xMax ); { - FT_Int max_advance; + FT_Pos max_advance; error = T1_Compute_Max_Advance( face, &max_advance ); diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c index b44d22236..5e99e70ee 100644 --- a/src/type42/t42parse.c +++ b/src/type42/t42parse.c @@ -383,7 +383,7 @@ /* read the number of entries in the encoding, should be 256 */ - count = T1_ToInt( parser ); + count = (FT_Int)T1_ToInt( parser ); if ( parser->root.error ) return; @@ -451,7 +451,7 @@ parser->root.cursor = cur; - charcode = T1_ToInt( parser ); + charcode = (FT_Int)T1_ToInt( parser ); cur = parser->root.cursor; /* skip whitespace */ @@ -715,7 +715,7 @@ FT_Int n; - loader->num_glyphs = T1_ToInt( parser ); + loader->num_glyphs = (FT_Int)T1_ToInt( parser ); if ( parser->root.error ) return; @@ -864,11 +864,11 @@ FT_Byte* base, FT_Long size ) { - T42_Parser parser = &loader->parser; - FT_Byte* cur = base; - FT_Byte* limit = cur + size; - FT_UInt n_keywords = sizeof ( t42_keywords ) / - sizeof ( t42_keywords[0] ); + T42_Parser parser = &loader->parser; + FT_Byte* cur = base; + FT_Byte* limit = cur + size; + FT_UInt n_keywords = (FT_UInt)( sizeof ( t42_keywords ) / + sizeof ( t42_keywords[0] ) ); parser->root.cursor = base; diff --git a/src/type42/t42parse.h b/src/type42/t42parse.h index 9bcb65730..7339aa63b 100644 --- a/src/type42/t42parse.h +++ b/src/type42/t42parse.h @@ -4,7 +4,7 @@ /* */ /* Type 42 font parser (specification). */ /* */ -/* Copyright 2002 by Roberto Alameda. */ +/* Copyright 2002, 2003 by Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -31,7 +31,7 @@ FT_BEGIN_HEADER FT_Stream stream; FT_Byte* base_dict; - FT_Int base_len; + FT_Long base_len; FT_Byte in_memory;