diff --git a/ChangeLog b/ChangeLog index 584d41e23..cce3a49ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-18 Werner Lemberg + + [autofit] s/ScriptMetrics/StyleMetrics/. + 2013-12-18 Werner Lemberg [autofit] s/script_{metrics,hints}/style_{metrics,hints}/ diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c index 364c186b5..0ebd46c43 100644 --- a/src/autofit/afcjk.c +++ b/src/autofit/afcjk.c @@ -118,7 +118,7 @@ scaler->render_mode = FT_RENDER_MODE_NORMAL; scaler->flags = 0; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy ); error = af_glyph_hints_reload( hints, &face->glyph->outline ); if ( error ) @@ -1234,7 +1234,7 @@ FT_UInt32 scaler_flags, other_flags; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics ); /* * correct x_scale and y_scale when needed, since they may have diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h index 6f5bdc53d..b0559a203 100644 --- a/src/autofit/afcjk.h +++ b/src/autofit/afcjk.h @@ -105,9 +105,9 @@ FT_BEGIN_HEADER typedef struct AF_CJKMetricsRec_ { - AF_ScriptMetricsRec root; - FT_UInt units_per_em; - AF_CJKAxisRec axis[AF_DIMENSION_MAX]; + AF_StyleMetricsRec root; + FT_UInt units_per_em; + AF_CJKAxisRec axis[AF_DIMENSION_MAX]; } AF_CJKMetricsRec, *AF_CJKMetrics; diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c index 881863311..6a07c4eb7 100644 --- a/src/autofit/afdummy.c +++ b/src/autofit/afdummy.c @@ -23,8 +23,8 @@ static FT_Error - af_dummy_hints_init( AF_GlyphHints hints, - AF_ScriptMetrics metrics ) + af_dummy_hints_init( AF_GlyphHints hints, + AF_StyleMetrics metrics ) { af_glyph_hints_rescale( hints, metrics ); @@ -57,7 +57,7 @@ AF_WRITING_SYSTEM_DUMMY, - sizeof ( AF_ScriptMetricsRec ), + sizeof ( AF_StyleMetricsRec ), (AF_WritingSystem_InitMetricsFunc) NULL, (AF_WritingSystem_ScaleMetricsFunc)NULL, diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index 66674eb22..74a9a1a43 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -254,12 +254,12 @@ FT_LOCAL_DEF( FT_Error ) - af_face_globals_get_metrics( AF_FaceGlobals globals, - FT_UInt gindex, - FT_UInt options, - AF_ScriptMetrics *ametrics ) + af_face_globals_get_metrics( AF_FaceGlobals globals, + FT_UInt gindex, + FT_UInt options, + AF_StyleMetrics *ametrics ) { - AF_ScriptMetrics metrics = NULL; + AF_StyleMetrics metrics = NULL; AF_Script script = (AF_Script)( options & 15 ); AF_WritingSystemClass writing_system_class; diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h index a36e47b8f..f35871491 100644 --- a/src/autofit/afglobal.h +++ b/src/autofit/afglobal.h @@ -76,16 +76,16 @@ FT_BEGIN_HEADER */ typedef struct AF_FaceGlobalsRec_ { - FT_Face face; - FT_Long glyph_count; /* same as face->num_glyphs */ - FT_Byte* glyph_styles; + FT_Face face; + FT_Long glyph_count; /* same as face->num_glyphs */ + FT_Byte* glyph_styles; /* per-face auto-hinter properties */ - FT_UInt increase_x_height; + FT_UInt increase_x_height; - AF_ScriptMetrics metrics[AF_SCRIPT_MAX]; + AF_StyleMetrics metrics[AF_SCRIPT_MAX]; - AF_Module module; /* to access global properties */ + AF_Module module; /* to access global properties */ } AF_FaceGlobalsRec; @@ -101,10 +101,10 @@ FT_BEGIN_HEADER AF_Module module ); FT_LOCAL( FT_Error ) - af_face_globals_get_metrics( AF_FaceGlobals globals, - FT_UInt gindex, - FT_UInt options, - AF_ScriptMetrics *ametrics ); + af_face_globals_get_metrics( AF_FaceGlobals globals, + FT_UInt gindex, + FT_UInt options, + AF_StyleMetrics *ametrics ); FT_LOCAL( void ) af_face_globals_free( AF_FaceGlobals globals ); diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index ce504ccca..dc8557ee3 100644 --- a/src/autofit/afhints.c +++ b/src/autofit/afhints.c @@ -533,8 +533,8 @@ /* Reset metrics. */ FT_LOCAL_DEF( void ) - af_glyph_hints_rescale( AF_GlyphHints hints, - AF_ScriptMetrics metrics ) + af_glyph_hints_rescale( AF_GlyphHints hints, + AF_StyleMetrics metrics ) { hints->metrics = metrics; hints->scaler_flags = metrics->scaler.flags; diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h index ce5232545..34a76a8b9 100644 --- a/src/autofit/afhints.h +++ b/src/autofit/afhints.h @@ -343,31 +343,31 @@ FT_BEGIN_HEADER typedef struct AF_GlyphHintsRec_ { - FT_Memory memory; + FT_Memory memory; - FT_Fixed x_scale; - FT_Pos x_delta; + FT_Fixed x_scale; + FT_Pos x_delta; - FT_Fixed y_scale; - FT_Pos y_delta; + FT_Fixed y_scale; + FT_Pos y_delta; - FT_Int max_points; /* number of allocated points */ - FT_Int num_points; /* number of used points */ - AF_Point points; /* points array */ + FT_Int max_points; /* number of allocated points */ + FT_Int num_points; /* number of used points */ + AF_Point points; /* points array */ - FT_Int max_contours; /* number of allocated contours */ - FT_Int num_contours; /* number of used contours */ - AF_Point* contours; /* contours array */ + FT_Int max_contours; /* number of allocated contours */ + FT_Int num_contours; /* number of used contours */ + AF_Point* contours; /* contours array */ - AF_AxisHintsRec axis[AF_DIMENSION_MAX]; + AF_AxisHintsRec axis[AF_DIMENSION_MAX]; - FT_UInt32 scaler_flags; /* copy of scaler flags */ - FT_UInt32 other_flags; /* free for script-specific */ - /* implementations */ - AF_ScriptMetrics metrics; + FT_UInt32 scaler_flags; /* copy of scaler flags */ + FT_UInt32 other_flags; /* free for script-specific */ + /* implementations */ + AF_StyleMetrics metrics; - FT_Pos xmin_delta; /* used for warping */ - FT_Pos xmax_delta; + FT_Pos xmin_delta; /* used for warping */ + FT_Pos xmax_delta; } AF_GlyphHintsRec; @@ -429,8 +429,8 @@ FT_BEGIN_HEADER FT_Memory memory ); FT_LOCAL( void ) - af_glyph_hints_rescale( AF_GlyphHints hints, - AF_ScriptMetrics metrics ); + af_glyph_hints_rescale( AF_GlyphHints hints, + AF_StyleMetrics metrics ); FT_LOCAL( FT_Error ) af_glyph_hints_reload( AF_GlyphHints hints, diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index d440834c4..2c434e5ed 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -105,7 +105,7 @@ scaler->render_mode = FT_RENDER_MODE_NORMAL; scaler->flags = 0; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy ); error = af_glyph_hints_reload( hints, &face->glyph->outline ); if ( error ) @@ -1797,7 +1797,7 @@ FT_Face face = metrics->root.scaler.face; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics ); /* * correct x_scale and y_scale if needed, since they may have diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h index c06cbd9a6..4d3269ba3 100644 --- a/src/autofit/aflatin.h +++ b/src/autofit/aflatin.h @@ -113,9 +113,9 @@ FT_BEGIN_HEADER typedef struct AF_LatinMetricsRec_ { - AF_ScriptMetricsRec root; - FT_UInt units_per_em; - AF_LatinAxisRec axis[AF_DIMENSION_MAX]; + AF_StyleMetricsRec root; + FT_UInt units_per_em; + AF_LatinAxisRec axis[AF_DIMENSION_MAX]; } AF_LatinMetricsRec, *AF_LatinMetrics; diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c index 486dcdee9..d2cda8ba2 100644 --- a/src/autofit/aflatin2.c +++ b/src/autofit/aflatin2.c @@ -95,7 +95,7 @@ scaler->render_mode = FT_RENDER_MODE_NORMAL; scaler->flags = 0; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)dummy ); error = af_glyph_hints_reload( hints, &face->glyph->outline ); if ( error ) @@ -1501,7 +1501,7 @@ FT_Face face = metrics->root.scaler.face; - af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); + af_glyph_hints_rescale( hints, (AF_StyleMetrics)metrics ); /* * correct x_scale and y_scale if needed, since they may have diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 9cf3a68e9..68cf8573b 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -109,7 +109,7 @@ FT_Error error; FT_Face face = loader->face; FT_GlyphLoader gloader = loader->gloader; - AF_ScriptMetrics metrics = loader->metrics; + AF_StyleMetrics metrics = loader->metrics; AF_GlyphHints hints = &loader->hints; FT_GlyphSlot slot = face->glyph; FT_Slot_Internal internal = slot->internal; @@ -529,8 +529,8 @@ error = af_loader_reset( module, face ); if ( !error ) { - AF_ScriptMetrics metrics; - FT_UInt options = AF_SCRIPT_NONE; + AF_StyleMetrics metrics; + FT_UInt options = AF_SCRIPT_NONE; #ifdef FT_OPTION_AUTOFIT2 diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h index 1f34d17cc..9601e24fc 100644 --- a/src/autofit/afloader.h +++ b/src/autofit/afloader.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (specification). */ /* */ -/* Copyright 2003-2005, 2011-2012 by */ +/* Copyright 2003-2005, 2011-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -44,7 +44,7 @@ FT_BEGIN_HEADER /* current glyph data */ FT_GlyphLoader gloader; AF_GlyphHintsRec hints; - AF_ScriptMetrics metrics; + AF_StyleMetrics metrics; FT_Bool transformed; FT_Matrix trans_matrix; FT_Vector trans_delta; diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h index 921067791..7fddbf5e6 100644 --- a/src/autofit/aftypes.h +++ b/src/autofit/aftypes.h @@ -212,7 +212,7 @@ extern void* _af_debug_hints; typedef struct AF_ScriptClassRec_ const* AF_ScriptClass; typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals; - typedef struct AF_ScriptMetricsRec_ + typedef struct AF_StyleMetricsRec_ { AF_ScriptClass script_class; AF_ScalerRec scaler; @@ -220,32 +220,32 @@ extern void* _af_debug_hints; AF_FaceGlobals globals; /* to access properties */ - } AF_ScriptMetricsRec, *AF_ScriptMetrics; + } AF_StyleMetricsRec, *AF_StyleMetrics; /* This function parses an FT_Face to compute global metrics for * a specific script. */ typedef FT_Error - (*AF_WritingSystem_InitMetricsFunc)( AF_ScriptMetrics metrics, - FT_Face face ); + (*AF_WritingSystem_InitMetricsFunc)( AF_StyleMetrics metrics, + FT_Face face ); typedef void - (*AF_WritingSystem_ScaleMetricsFunc)( AF_ScriptMetrics metrics, - AF_Scaler scaler ); + (*AF_WritingSystem_ScaleMetricsFunc)( AF_StyleMetrics metrics, + AF_Scaler scaler ); typedef void - (*AF_WritingSystem_DoneMetricsFunc)( AF_ScriptMetrics metrics ); + (*AF_WritingSystem_DoneMetricsFunc)( AF_StyleMetrics metrics ); typedef FT_Error - (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints hints, - AF_ScriptMetrics metrics ); + (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints hints, + AF_StyleMetrics metrics ); typedef void - (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints hints, - FT_Outline* outline, - AF_ScriptMetrics metrics ); + (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints hints, + FT_Outline* outline, + AF_StyleMetrics metrics ); /*************************************************************************/