forked from minhngoc25a/freetype2
[Savannah bug #43682] Change some signatures to `void' return type.
* include/internal/pshints.h (PSH_Globals_SetScaleFunc), include/internal/sfnt.h (TT_Get_Metrics_Func), src/pshinter/pshglob.c (psh_globals_set_scale), src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange, TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context, TT_Save_Context): Do it. * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h, src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Updated.
This commit is contained in:
parent
6889f7b72d
commit
ef439fd209
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2014-11-24 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[Savannah bug #43682] Change some signatures to `void' return type.
|
||||
|
||||
* include/internal/pshints.h (PSH_Globals_SetScaleFunc),
|
||||
include/internal/sfnt.h (TT_Get_Metrics_Func),
|
||||
src/pshinter/pshglob.c (psh_globals_set_scale),
|
||||
src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
|
||||
(tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
|
||||
TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
|
||||
TT_Save_Context): Do it.
|
||||
|
||||
* src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
|
||||
src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
|
||||
(TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
|
||||
(tt_size_run_fpgm, tt_size_run_prep): Updated.
|
||||
|
||||
2014-11-24 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* recorders (specification only). These are used to support native */
|
||||
/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */
|
||||
/* */
|
||||
/* Copyright 2001-2003, 2005-2007, 2009, 2012 by */
|
||||
/* Copyright 2001-2003, 2005-2007, 2009, 2012, 2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -45,7 +45,7 @@ FT_BEGIN_HEADER
|
|||
T1_Private* private_dict,
|
||||
PSH_Globals* aglobals );
|
||||
|
||||
typedef FT_Error
|
||||
typedef void
|
||||
(*PSH_Globals_SetScaleFunc)( PSH_Globals globals,
|
||||
FT_Fixed x_scale,
|
||||
FT_Fixed y_scale,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* High-level `sfnt' driver interface (specification). */
|
||||
/* */
|
||||
/* Copyright 1996-2006, 2009, 2012-2013 by */
|
||||
/* Copyright 1996-2006, 2009, 2012-2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -405,14 +405,18 @@ FT_BEGIN_HEADER
|
|||
/* <Input> */
|
||||
/* face :: A handle to the target face object. */
|
||||
/* */
|
||||
/* stream :: The input stream. */
|
||||
/* */
|
||||
/* vertical :: A boolean flag. If set, load vertical metrics. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* gindex :: The glyph index. */
|
||||
/* */
|
||||
typedef FT_Error
|
||||
/* <Output> */
|
||||
/* abearing :: The horizontal (or vertical) bearing. Set to zero in */
|
||||
/* case of error. */
|
||||
/* */
|
||||
/* aadvance :: The horizontal (or vertical) advance. Set to zero in */
|
||||
/* case of error. */
|
||||
/* */
|
||||
typedef void
|
||||
(*TT_Get_Metrics_Func)( TT_Face face,
|
||||
FT_Bool vertical,
|
||||
FT_UInt gindex,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* PostScript hinter global hinting management (body). */
|
||||
/* Inspired by the new auto-hinter module. */
|
||||
/* */
|
||||
/* Copyright 2001-2004, 2006, 2010, 2012, 2013 by */
|
||||
/* Copyright 2001-2004, 2006, 2010, 2012-2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used */
|
||||
|
@ -750,7 +750,7 @@
|
|||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
psh_globals_set_scale( PSH_Globals globals,
|
||||
FT_Fixed x_scale,
|
||||
FT_Fixed y_scale,
|
||||
|
@ -780,8 +780,6 @@
|
|||
psh_globals_scale_widths( globals, 1 );
|
||||
psh_blues_scale_zones( &globals->blues, y_scale, y_delta );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* PostScript hinter global hinting management. */
|
||||
/* */
|
||||
/* Copyright 2001, 2002, 2003 by */
|
||||
/* Copyright 2001, 2002, 2003, 2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -167,7 +167,7 @@ FT_BEGIN_HEADER
|
|||
FT_Int org_width );
|
||||
#endif
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
psh_globals_set_scale( PSH_Globals globals,
|
||||
FT_Fixed x_scale,
|
||||
FT_Fixed y_scale,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* FreeType PostScript hints recorder (body). */
|
||||
/* */
|
||||
/* Copyright 2001-2004, 2007, 2009, 2013 by */
|
||||
/* Copyright 2001-2004, 2007, 2009, 2013, 2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -797,13 +797,12 @@
|
|||
}
|
||||
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
ps_hints_init( PS_Hints hints,
|
||||
FT_Memory memory )
|
||||
{
|
||||
FT_MEM_ZERO( hints, sizeof ( *hints ) );
|
||||
hints->memory = memory;
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Postscript (Type1/Type2) hints recorder (specification). */
|
||||
/* */
|
||||
/* Copyright 2001, 2002, 2003, 2006, 2008 by */
|
||||
/* Copyright 2001, 2002, 2003, 2006, 2008, 2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -141,7 +141,7 @@ FT_BEGIN_HEADER
|
|||
/* */
|
||||
|
||||
/* initialize hints recorder */
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
ps_hints_init( PS_Hints hints,
|
||||
FT_Memory memory );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Load the metrics tables common to TTF and OTF fonts (body). */
|
||||
/* */
|
||||
/* Copyright 2006-2009, 2011-2013 by */
|
||||
/* Copyright 2006-2009, 2011-2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -201,7 +201,7 @@
|
|||
/* aadvance :: The advance width or advance height, depending on */
|
||||
/* the `vertical' flag. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
tt_face_get_metrics( TT_Face face,
|
||||
FT_Bool vertical,
|
||||
FT_UInt gindex,
|
||||
|
@ -274,8 +274,6 @@
|
|||
*abearing = 0;
|
||||
*aadvance = 0;
|
||||
}
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* Load the metrics tables common to TTF and OTF fonts (specification). */
|
||||
/* */
|
||||
/* Copyright 2006 by */
|
||||
/* Copyright 2006, 2014 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -40,7 +40,7 @@ FT_BEGIN_HEADER
|
|||
FT_Bool vertical );
|
||||
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
tt_face_get_metrics( TT_Face face,
|
||||
FT_Bool vertical,
|
||||
FT_UInt gindex,
|
||||
|
|
|
@ -801,10 +801,8 @@
|
|||
FT_Outline current_outline = gloader->current.outline;
|
||||
|
||||
|
||||
error = TT_Set_CodeRange( loader->exec, tt_coderange_glyph,
|
||||
loader->exec->glyphIns, n_ins );
|
||||
if ( error )
|
||||
return error;
|
||||
TT_Set_CodeRange( loader->exec, tt_coderange_glyph,
|
||||
loader->exec->glyphIns, n_ins );
|
||||
|
||||
loader->exec->is_composite = is_composite;
|
||||
loader->exec->pts = *zone;
|
||||
|
|
|
@ -279,10 +279,7 @@
|
|||
/* <InOut> */
|
||||
/* exec :: The target execution context. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
TT_Goto_CodeRange( TT_ExecContext exec,
|
||||
FT_Int range,
|
||||
FT_Long IP )
|
||||
|
@ -306,8 +303,6 @@
|
|||
exec->codeSize = coderange->size;
|
||||
exec->IP = IP;
|
||||
exec->curRange = range;
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -329,10 +324,7 @@
|
|||
/* <InOut> */
|
||||
/* exec :: The target execution context. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
TT_Set_CodeRange( TT_ExecContext exec,
|
||||
FT_Int range,
|
||||
void* base,
|
||||
|
@ -342,8 +334,6 @@
|
|||
|
||||
exec->codeRangeTable[range - 1].base = (FT_Byte*)base;
|
||||
exec->codeRangeTable[range - 1].size = length;
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,13 +351,7 @@
|
|||
/* <InOut> */
|
||||
/* exec :: The target execution context. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Does not set the Error variable. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
TT_Clear_CodeRange( TT_ExecContext exec,
|
||||
FT_Int range )
|
||||
{
|
||||
|
@ -375,8 +359,6 @@
|
|||
|
||||
exec->codeRangeTable[range - 1].base = NULL;
|
||||
exec->codeRangeTable[range - 1].size = 0;
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -400,13 +382,10 @@
|
|||
/* */
|
||||
/* memory :: A handle to the parent memory object. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Only the glyph loader and debugger should call this function. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
TT_Done_Context( TT_ExecContext exec )
|
||||
{
|
||||
FT_Memory memory = exec->memory;
|
||||
|
@ -433,8 +412,6 @@
|
|||
exec->face = NULL;
|
||||
|
||||
FT_FREE( exec );
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -661,13 +638,10 @@
|
|||
/* <InOut> */
|
||||
/* size :: A handle to the target size object. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Only the glyph loader and debugger should call this function. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
FT_LOCAL_DEF( void )
|
||||
TT_Save_Context( TT_ExecContext exec,
|
||||
TT_Size size )
|
||||
{
|
||||
|
@ -685,8 +659,6 @@
|
|||
|
||||
for ( i = 0; i < TT_MAX_CODE_RANGES; i++ )
|
||||
size->codeRangeTable[i] = exec->codeRangeTable[i];
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
|
@ -718,12 +690,7 @@
|
|||
TT_Run_Context( TT_ExecContext exec,
|
||||
FT_Bool debug )
|
||||
{
|
||||
FT_Error error;
|
||||
|
||||
|
||||
if ( ( error = TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ) )
|
||||
!= FT_Err_Ok )
|
||||
return error;
|
||||
TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 );
|
||||
|
||||
exec->zp0 = exec->pts;
|
||||
exec->zp1 = exec->pts;
|
||||
|
|
|
@ -296,18 +296,18 @@ FT_BEGIN_HEADER
|
|||
|
||||
|
||||
#ifdef TT_USE_BYTECODE_INTERPRETER
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
TT_Goto_CodeRange( TT_ExecContext exec,
|
||||
FT_Int range,
|
||||
FT_Long IP );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
TT_Set_CodeRange( TT_ExecContext exec,
|
||||
FT_Int range,
|
||||
void* base,
|
||||
FT_Long length );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
TT_Clear_CodeRange( TT_ExecContext exec,
|
||||
FT_Int range );
|
||||
|
||||
|
@ -345,7 +345,7 @@ FT_BEGIN_HEADER
|
|||
|
||||
|
||||
#ifdef TT_USE_BYTECODE_INTERPRETER
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
TT_Done_Context( TT_ExecContext exec );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
|
@ -353,7 +353,7 @@ FT_BEGIN_HEADER
|
|||
TT_Face face,
|
||||
TT_Size size );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
FT_LOCAL( void )
|
||||
TT_Save_Context( TT_ExecContext exec,
|
||||
TT_Size ins );
|
||||
|
||||
|
|
|
@ -801,14 +801,10 @@
|
|||
|
||||
if ( face->font_program_size > 0 )
|
||||
{
|
||||
error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
|
||||
TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
|
||||
|
||||
if ( !error )
|
||||
{
|
||||
FT_TRACE4(( "Executing `fpgm' table.\n" ));
|
||||
|
||||
error = face->interpreter( exec );
|
||||
}
|
||||
FT_TRACE4(( "Executing `fpgm' table.\n" ));
|
||||
error = face->interpreter( exec );
|
||||
}
|
||||
else
|
||||
error = FT_Err_Ok;
|
||||
|
@ -874,9 +870,9 @@
|
|||
|
||||
if ( face->cvt_program_size > 0 )
|
||||
{
|
||||
error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
|
||||
TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
|
||||
|
||||
if ( !error && !size->debug )
|
||||
if ( !size->debug )
|
||||
{
|
||||
FT_TRACE4(( "Executing `prep' table.\n" ));
|
||||
|
||||
|
|
Loading…
Reference in New Issue