1 /***************************************************************************/
5 /* Auto-fitter routines to compute global hinting values */
8 /* Copyright 2003-2005, 2007, 2009, 2011-2012 by */
9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
11 /* This file is part of the FreeType project, and may only be used, */
12 /* modified, and distributed under the terms of the FreeType project */
13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
14 /* this file you indicate that you have read the license and */
15 /* understand and accept it fully. */
17 /***************************************************************************/
20 #ifndef __AFGLOBAL_H__
21 #define __AFGLOBAL_H__
32 * Default values and flags for both autofitter globals (found in
33 * AF_ModuleRec) and face globals (in AF_FaceGlobalsRec).
36 /* index of fallback script in `af_script_classes' */
37 #define AF_SCRIPT_FALLBACK 2
38 /* a bit mask indicating an uncovered glyph */
39 #define AF_SCRIPT_NONE 0x7F
40 /* if this flag is set, we have an ASCII digit */
43 /* `increase-x-height' property */
44 #define AF_PROP_INCREASE_X_HEIGHT_MIN 6
45 #define AF_PROP_INCREASE_X_HEIGHT_MAX 0
48 /************************************************************************/
49 /************************************************************************/
51 /***** F A C E G L O B A L S *****/
53 /************************************************************************/
54 /************************************************************************/
58 * Note that glyph_scripts[] is used to map each glyph into
59 * an index into the `af_script_classes' array.
62 typedef struct AF_FaceGlobalsRec_
65 FT_Long glyph_count
; /* same as face->num_glyphs */
66 FT_Byte
* glyph_scripts
;
68 /* per-face auto-hinter properties */
69 FT_UInt increase_x_height
;
71 AF_ScriptMetrics metrics
[AF_SCRIPT_MAX
];
73 AF_Module module
; /* to access global properties */
79 * model the global hints data for a given face, decomposed into
80 * script-specific items
84 af_face_globals_new( FT_Face face
,
85 AF_FaceGlobals
*aglobals
,
89 af_face_globals_get_metrics( AF_FaceGlobals globals
,
92 AF_ScriptMetrics
*ametrics
);
95 af_face_globals_free( AF_FaceGlobals globals
);
97 FT_LOCAL_DEF( FT_Bool
)
98 af_face_globals_is_digit( AF_FaceGlobals globals
,
106 #endif /* __AFGLOBAL_H__ */