diff --git a/src/base/ftdriver.h b/src/base/ftdriver.h index ff8e6b2f5..128a4843a 100644 --- a/src/base/ftdriver.h +++ b/src/base/ftdriver.h @@ -72,6 +72,7 @@ /* */ typedef FT_Error (*FTDriver_doneDriver)( FT_Driver driver ); + /*************************************************************************/ /* */ @@ -100,8 +101,11 @@ /* isn't available (i.e., wasn't compiled in the driver at build */ /* time). */ /* */ - typedef void* (*FTDriver_getInterface)( FT_Driver driver, - const FT_String* interface ); + typedef void (*FTDriver_Interface)( void ); + + typedef FTDriver_Interface (*FTDriver_getInterface) + ( FT_Driver driver, + const FT_String* interface ); /*************************************************************************/ diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 0fb604e26..f7a27a237 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -206,9 +206,9 @@ if ( n_contours > load->left_contours ) { FT_TRACE0(( "ERROR: Glyph index %ld has %d contours > left %d\n", - subg->index, + load->glyph_index, n_contours, - left_contours )); + load->left_contours )); return TT_Err_Too_Many_Contours; } @@ -236,7 +236,7 @@ if ( n_points > load->left_points ) { - FT_TRACE0(( "ERROR: Too many points in glyph %ld\n", subg->index )); + FT_TRACE0(( "ERROR: Too many points in glyph %ld\n", load->glyph_index )); error = TT_Err_Too_Many_Points; goto Fail; } @@ -478,6 +478,7 @@ goto Fail; } + loader->glyph_index = glyph_index; num_contours = 0; num_points = 0; ins_offset = 0; diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h index 3dcdabff6..ac4f29ef5 100644 --- a/src/truetype/ttgload.h +++ b/src/truetype/ttgload.h @@ -36,6 +36,7 @@ TT_GlyphSlot glyph; TT_ULong load_flags; + TT_UInt glyph_index; FT_Stream stream; TT_Int byte_len; diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c index 8b673b7dd..abd19b8b3 100644 --- a/src/type1/t1afm.c +++ b/src/type1/t1afm.c @@ -44,7 +44,7 @@ len = p - *start; if (len > 0 && len < 64) { - FT_UInt n; + FT_Int n; /* copy glyph name to intermediate array */ MEM_Copy( temp, start, len ); @@ -124,8 +124,8 @@ if ( !ACCESS_Frame(stream->size) ) return error; - start = stream->cursor; - limit = stream->limit; + start = (FT_Byte*)stream->cursor; + limit = (FT_Byte*)stream->limit; p = start; /* we are now going to count the occurences of "KP" or "KPX" in */ diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c index 486e03c67..d2fb29f51 100644 --- a/src/type1/t1driver.c +++ b/src/type1/t1driver.c @@ -55,11 +55,11 @@ /* time). */ /* */ static - void* Get_Interface( FT_Driver driver, - const FT_String* interface ) + FTDriver_Interface Get_Interface( FT_Driver driver, + const FT_String* interface ) { if ( strcmp( (const char*)interface, "attach_file" ) == 0 ) - return T1_Read_AFM; + return (FTDriver_Interface)T1_Read_AFM; return 0; }