[autofit] Signature fixes.
This commit is contained in:
parent
365eb10dd4
commit
274e0dd5b5
|
@ -633,10 +633,11 @@
|
|||
/* Initialize global metrics. */
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
af_cjk_metrics_init( AF_CJKMetrics metrics,
|
||||
FT_Face face )
|
||||
af_cjk_metrics_init( AF_StyleMetrics metrics_, /* AF_CJKMetrics */
|
||||
FT_Face face )
|
||||
{
|
||||
FT_CharMap oldmap = face->charmap;
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
FT_CharMap oldmap = face->charmap;
|
||||
|
||||
|
||||
metrics->units_per_em = face->units_per_EM;
|
||||
|
@ -754,9 +755,12 @@
|
|||
/* Scale global values in both directions. */
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
af_cjk_metrics_scale( AF_CJKMetrics metrics,
|
||||
AF_Scaler scaler )
|
||||
af_cjk_metrics_scale( AF_StyleMetrics metrics_, /* AF_CJKMetrics */
|
||||
AF_Scaler scaler )
|
||||
{
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
|
||||
|
||||
/* we copy the whole structure since the x and y scaling values */
|
||||
/* are not modified, contrary to e.g. the `latin' auto-hinter */
|
||||
metrics->root.scaler = *scaler;
|
||||
|
@ -770,10 +774,13 @@
|
|||
/* metrics class. */
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
af_cjk_get_standard_widths( AF_CJKMetrics metrics,
|
||||
FT_Pos* stdHW,
|
||||
FT_Pos* stdVW )
|
||||
af_cjk_get_standard_widths( AF_StyleMetrics metrics_, /* AF_CJKMetrics */
|
||||
FT_Pos* stdHW,
|
||||
FT_Pos* stdVW )
|
||||
{
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
|
||||
|
||||
if ( stdHW )
|
||||
*stdHW = metrics->axis[AF_DIMENSION_VERT].standard_width;
|
||||
|
||||
|
@ -1374,9 +1381,10 @@
|
|||
/* Initalize hinting engine. */
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
af_cjk_hints_init( AF_GlyphHints hints,
|
||||
AF_CJKMetrics metrics )
|
||||
af_cjk_hints_init( AF_GlyphHints hints,
|
||||
AF_StyleMetrics metrics_ ) /* AF_CJKMetrics */
|
||||
{
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
FT_Render_Mode mode;
|
||||
FT_UInt32 scaler_flags, other_flags;
|
||||
|
||||
|
@ -2266,11 +2274,13 @@
|
|||
/* Apply the complete hinting algorithm to a CJK glyph. */
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
af_cjk_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_CJKMetrics metrics )
|
||||
af_cjk_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_StyleMetrics metrics_ ) /* AF_CJKMetrics */
|
||||
{
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
|
||||
FT_Error error;
|
||||
int dim;
|
||||
|
||||
|
|
|
@ -103,22 +103,22 @@ FT_BEGIN_HEADER
|
|||
|
||||
#ifdef AF_CONFIG_OPTION_CJK
|
||||
FT_LOCAL( FT_Error )
|
||||
af_cjk_metrics_init( AF_CJKMetrics metrics,
|
||||
FT_Face face );
|
||||
af_cjk_metrics_init( AF_StyleMetrics metrics,
|
||||
FT_Face face );
|
||||
|
||||
FT_LOCAL( void )
|
||||
af_cjk_metrics_scale( AF_CJKMetrics metrics,
|
||||
AF_Scaler scaler );
|
||||
af_cjk_metrics_scale( AF_StyleMetrics metrics,
|
||||
AF_Scaler scaler );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
af_cjk_hints_init( AF_GlyphHints hints,
|
||||
AF_CJKMetrics metrics );
|
||||
af_cjk_hints_init( AF_GlyphHints hints,
|
||||
AF_StyleMetrics metrics );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
af_cjk_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_CJKMetrics metrics );
|
||||
af_cjk_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_StyleMetrics metrics );
|
||||
|
||||
/* shared; called from afindic.c */
|
||||
FT_LOCAL( void )
|
||||
|
|
|
@ -376,8 +376,11 @@
|
|||
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
af_face_globals_free( AF_FaceGlobals globals )
|
||||
af_face_globals_free( void* globals_ )
|
||||
{
|
||||
AF_FaceGlobals globals = (AF_FaceGlobals)globals_;
|
||||
|
||||
|
||||
if ( globals )
|
||||
{
|
||||
FT_Memory memory = globals->face->memory;
|
||||
|
|
|
@ -156,7 +156,7 @@ FT_BEGIN_HEADER
|
|||
AF_StyleMetrics *ametrics );
|
||||
|
||||
FT_LOCAL( void )
|
||||
af_face_globals_free( AF_FaceGlobals globals );
|
||||
af_face_globals_free( void* globals );
|
||||
|
||||
FT_LOCAL( FT_Bool )
|
||||
af_face_globals_is_digit( AF_FaceGlobals globals,
|
||||
|
|
|
@ -28,9 +28,12 @@
|
|||
|
||||
|
||||
static FT_Error
|
||||
af_indic_metrics_init( AF_CJKMetrics metrics,
|
||||
FT_Face face )
|
||||
af_indic_metrics_init( AF_StyleMetrics metrics_, /* AF_CJKMetrics */
|
||||
FT_Face face )
|
||||
{
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
|
||||
|
||||
/* skip blue zone init in CJK routines */
|
||||
FT_CharMap oldmap = face->charmap;
|
||||
|
||||
|
@ -55,8 +58,8 @@
|
|||
|
||||
|
||||
static void
|
||||
af_indic_metrics_scale( AF_CJKMetrics metrics,
|
||||
AF_Scaler scaler )
|
||||
af_indic_metrics_scale( AF_StyleMetrics metrics,
|
||||
AF_Scaler scaler )
|
||||
{
|
||||
/* use CJK routines */
|
||||
af_cjk_metrics_scale( metrics, scaler );
|
||||
|
@ -64,8 +67,8 @@
|
|||
|
||||
|
||||
static FT_Error
|
||||
af_indic_hints_init( AF_GlyphHints hints,
|
||||
AF_CJKMetrics metrics )
|
||||
af_indic_hints_init( AF_GlyphHints hints,
|
||||
AF_StyleMetrics metrics )
|
||||
{
|
||||
/* use CJK routines */
|
||||
return af_cjk_hints_init( hints, metrics );
|
||||
|
@ -73,10 +76,10 @@
|
|||
|
||||
|
||||
static FT_Error
|
||||
af_indic_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_CJKMetrics metrics )
|
||||
af_indic_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_StyleMetrics metrics )
|
||||
{
|
||||
/* use CJK routines */
|
||||
return af_cjk_hints_apply( glyph_index, hints, outline, metrics );
|
||||
|
@ -87,10 +90,13 @@
|
|||
/* metrics class. */
|
||||
|
||||
static void
|
||||
af_indic_get_standard_widths( AF_CJKMetrics metrics,
|
||||
FT_Pos* stdHW,
|
||||
FT_Pos* stdVW )
|
||||
af_indic_get_standard_widths( AF_StyleMetrics metrics_, /* AF_CJKMetrics */
|
||||
FT_Pos* stdHW,
|
||||
FT_Pos* stdVW )
|
||||
{
|
||||
AF_CJKMetrics metrics = (AF_CJKMetrics)metrics_;
|
||||
|
||||
|
||||
if ( stdHW )
|
||||
*stdHW = metrics->axis[AF_DIMENSION_VERT].standard_width;
|
||||
|
||||
|
|
|
@ -1131,9 +1131,11 @@
|
|||
/* Initialize global metrics. */
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
af_latin_metrics_init( AF_LatinMetrics metrics,
|
||||
af_latin_metrics_init( AF_StyleMetrics metrics_, /* AF_LatinMetrics */
|
||||
FT_Face face )
|
||||
{
|
||||
AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
|
||||
|
||||
FT_Error error = FT_Err_Ok;
|
||||
|
||||
FT_CharMap oldmap = face->charmap;
|
||||
|
@ -1486,9 +1488,12 @@
|
|||
/* Scale global values in both directions. */
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
af_latin_metrics_scale( AF_LatinMetrics metrics,
|
||||
af_latin_metrics_scale( AF_StyleMetrics metrics_, /* AF_LatinMetrics */
|
||||
AF_Scaler scaler )
|
||||
{
|
||||
AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
|
||||
|
||||
|
||||
metrics->root.scaler.render_mode = scaler->render_mode;
|
||||
metrics->root.scaler.face = scaler->face;
|
||||
metrics->root.scaler.flags = scaler->flags;
|
||||
|
@ -1502,10 +1507,13 @@
|
|||
/* metrics class. */
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
af_latin_get_standard_widths( AF_LatinMetrics metrics,
|
||||
af_latin_get_standard_widths( AF_StyleMetrics metrics_, /* AF_LatinMetrics */
|
||||
FT_Pos* stdHW,
|
||||
FT_Pos* stdVW )
|
||||
{
|
||||
AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
|
||||
|
||||
|
||||
if ( stdHW )
|
||||
*stdHW = metrics->axis[AF_DIMENSION_VERT].standard_width;
|
||||
|
||||
|
@ -2607,8 +2615,10 @@
|
|||
|
||||
static FT_Error
|
||||
af_latin_hints_init( AF_GlyphHints hints,
|
||||
AF_LatinMetrics metrics )
|
||||
AF_StyleMetrics metrics_ ) /* AF_LatinMetrics */
|
||||
{
|
||||
AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
|
||||
|
||||
FT_Render_Mode mode;
|
||||
FT_UInt32 scaler_flags, other_flags;
|
||||
FT_Face face = metrics->root.scaler.face;
|
||||
|
@ -3544,8 +3554,10 @@
|
|||
af_latin_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_LatinMetrics metrics )
|
||||
AF_StyleMetrics metrics_ ) /* AF_LatinMetrics */
|
||||
{
|
||||
AF_LatinMetrics metrics = (AF_LatinMetrics)metrics_;
|
||||
|
||||
FT_Error error;
|
||||
int dim;
|
||||
|
||||
|
|
|
@ -116,11 +116,11 @@ FT_BEGIN_HEADER
|
|||
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
af_latin_metrics_init( AF_LatinMetrics metrics,
|
||||
af_latin_metrics_init( AF_StyleMetrics metrics,
|
||||
FT_Face face );
|
||||
|
||||
FT_LOCAL( void )
|
||||
af_latin_metrics_scale( AF_LatinMetrics metrics,
|
||||
af_latin_metrics_scale( AF_StyleMetrics metrics,
|
||||
AF_Scaler scaler );
|
||||
|
||||
FT_LOCAL( void )
|
||||
|
|
|
@ -55,10 +55,8 @@
|
|||
error = af_face_globals_new( face, &loader->globals, module );
|
||||
if ( !error )
|
||||
{
|
||||
face->autohint.data =
|
||||
(FT_Pointer)loader->globals;
|
||||
face->autohint.finalizer =
|
||||
(FT_Generic_Finalizer)af_face_globals_free;
|
||||
face->autohint.data = (FT_Pointer)loader->globals;
|
||||
face->autohint.finalizer = af_face_globals_free;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,10 +89,8 @@
|
|||
error = af_face_globals_new( face, &globals, module );
|
||||
if ( !error )
|
||||
{
|
||||
face->autohint.data =
|
||||
(FT_Pointer)globals;
|
||||
face->autohint.finalizer =
|
||||
(FT_Generic_Finalizer)af_face_globals_free;
|
||||
face->autohint.data = (FT_Pointer)globals;
|
||||
face->autohint.finalizer = af_face_globals_free;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,12 +428,14 @@
|
|||
|
||||
|
||||
FT_CALLBACK_DEF( FT_Error )
|
||||
af_autofitter_load_glyph( AF_Module module,
|
||||
FT_GlyphSlot slot,
|
||||
FT_Size size,
|
||||
FT_UInt glyph_index,
|
||||
FT_Int32 load_flags )
|
||||
af_autofitter_load_glyph( FT_AutoHinter module_,
|
||||
FT_GlyphSlot slot,
|
||||
FT_Size size,
|
||||
FT_UInt glyph_index,
|
||||
FT_Int32 load_flags )
|
||||
{
|
||||
AF_Module module = (AF_Module)module_;
|
||||
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_Memory memory = module->root.library->memory;
|
||||
|
||||
|
|
Loading…
Reference in New Issue