[autofit] s/ScriptMetrics/StyleMetrics/.

This commit is contained in:
Werner Lemberg 2013-12-18 12:59:35 +01:00
parent 4fccc214f9
commit 3f91cb338b
14 changed files with 73 additions and 69 deletions

View File

@ -1,3 +1,7 @@
2013-12-18 Werner Lemberg <wl@gnu.org>
[autofit] s/ScriptMetrics/StyleMetrics/.
2013-12-18 Werner Lemberg <wl@gnu.org>
[autofit] s/script_{metrics,hints}/style_{metrics,hints}/

View File

@ -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

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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 );

View File

@ -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;

View File

@ -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,

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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 );
/*************************************************************************/