diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h index eec0e9271..707ce32fc 100644 --- a/src/autofit/afloader.h +++ b/src/autofit/afloader.h @@ -25,11 +25,21 @@ FT_BEGIN_HEADER - typedef struct AF_LoaderRec_ + /* + * The autofitter module's global data structure. If necessary, `local' + * data like the current face, the current face's auto-hint data, or the + * current glyph's parameters relevant to auto-hinting are `swapped in'. + * Cf. functions like `af_loader_reset' and `af_loader_load_g'. + */ + + typedef struct AF_LoaderRec_ { - FT_Face face; /* current face */ - AF_FaceGlobals globals; /* current face globals */ - FT_GlyphLoader gloader; /* glyph loader */ + /* current face data */ + FT_Face face; + AF_FaceGlobals globals; + + /* current glyph data */ + FT_GlyphLoader gloader; AF_GlyphHintsRec hints; AF_ScriptMetrics metrics; FT_Bool transformed; diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c index b13e6a9aa..ad6ce7eee 100644 --- a/src/autofit/afmodule.c +++ b/src/autofit/afmodule.c @@ -125,6 +125,13 @@ } + /* + * This is the `extended' FT_Module structure which holds the + * autofitter's global data (in `loader'). Right before hinting a glyph, + * the data specific to the glyph's face (blue zones, stem widths, etc.) + * are `swapped in' in function `af_loader_reset'. + */ + typedef struct FT_AutofitterRec_ { FT_ModuleRec root;