summaryrefslogtreecommitdiffstats
path: root/src/autofit/afglobal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/autofit/afglobal.h')
-rw-r--r--src/autofit/afglobal.h46
1 files changed, 42 insertions, 4 deletions
diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h
index cc6860b..2e24900 100644
--- a/src/autofit/afglobal.h
+++ b/src/autofit/afglobal.h
@@ -5,7 +5,7 @@
/* Auto-fitter routines to compute global hinting values */
/* (specification). */
/* */
-/* Copyright 2003-2005, 2007, 2009, 2011 by */
+/* Copyright 2003-2005, 2007, 2009, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,11 +22,29 @@
#include "aftypes.h"
+#include "afmodule.h"
FT_BEGIN_HEADER
+ /*
+ * Default values and flags for both autofitter globals (found in
+ * AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
+ */
+
+ /* index of fallback script in `af_script_classes' */
+#define AF_SCRIPT_FALLBACK 2
+ /* a bit mask indicating an uncovered glyph */
+#define AF_SCRIPT_NONE 0x7F
+ /* if this flag is set, we have an ASCII digit */
+#define AF_DIGIT 0x80
+
+ /* `increase-x-height' property */
+#define AF_PROP_INCREASE_X_HEIGHT_MIN 6
+#define AF_PROP_INCREASE_X_HEIGHT_MAX 0
+
+
/************************************************************************/
/************************************************************************/
/***** *****/
@@ -37,15 +55,35 @@ FT_BEGIN_HEADER
/*
+ * Note that glyph_scripts[] is used to map each glyph into
+ * an index into the `af_script_classes' array.
+ *
+ */
+ typedef struct AF_FaceGlobalsRec_
+ {
+ FT_Face face;
+ FT_Long glyph_count; /* same as face->num_glyphs */
+ FT_Byte* glyph_scripts;
+
+ /* per-face auto-hinter properties */
+ FT_UInt increase_x_height;
+
+ AF_ScriptMetrics metrics[AF_SCRIPT_MAX];
+
+ AF_Module module; /* to access global properties */
+
+ } AF_FaceGlobalsRec;
+
+
+ /*
* model the global hints data for a given face, decomposed into
* script-specific items
*/
- typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals;
-
FT_LOCAL( FT_Error )
af_face_globals_new( FT_Face face,
- AF_FaceGlobals *aglobals );
+ AF_FaceGlobals *aglobals,
+ AF_Module module );
FT_LOCAL( FT_Error )
af_face_globals_get_metrics( AF_FaceGlobals globals,