shithub: freetype+ttf2subf

Download patch

ref: 44481daf4335de767872b3e64bcc231e6ee567bc
parent: 2be60cfe7e01abaf1f15bf986069ac7abe93ff4c
author: Werner Lemberg <[email protected]>
date: Tue Sep 11 15:45:36 EDT 2012

[autofitter] Add some comments.

git/fs: mount .git/fs: mount/attach disallowed
--- 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;
--- 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;