4 * Copyright (C) 2011-2014 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
16 /* originally file `afglobal.h' (2011-Mar-28) from FreeType */
18 /* heavily modified 2011 by Werner Lemberg <wl@gnu.org> */
20 #ifndef __TAGLOBAL_H__
21 #define __TAGLOBAL_H__
27 extern TA_WritingSystemClass
const ta_writing_system_classes
[];
28 extern TA_StyleClass
const ta_style_classes
[];
32 extern const char* ta_style_names
[];
36 /* Default values and flags for both autofitter globals */
37 /* (originally found in AF_ModuleRec, we use FONT instead) */
38 /* and face globals (in TA_FaceGlobalsRec). */
40 /* index of fallback style in `ta_style_classes' */
41 #define TA_STYLE_FALLBACK TA_STYLE_NONE
42 /* a bit mask indicating an uncovered glyph */
43 #define TA_STYLE_UNASSIGNED 0x7F
44 /* if this flag is set, we have an ASCII digit */
47 /* `increase-x-height' property */
48 #define TA_PROP_INCREASE_X_HEIGHT_MIN 6
49 #define TA_PROP_INCREASE_X_HEIGHT_MAX 0
52 /* note that glyph_styles[] maps each glyph to an index into the */
53 /* `ta_style_classes' array. */
54 typedef struct TA_FaceGlobalsRec_
57 FT_Long glyph_count
; /* same as face->num_glyphs */
58 FT_Byte
* glyph_styles
;
60 /* per-face auto-hinter properties */
61 FT_UInt increase_x_height
;
63 TA_StyleMetrics metrics
[TA_STYLE_MAX
];
65 FONT
* font
; /* to access global properties */
69 /* this models the global hints data for a given face, */
70 /* decomposed into style-specific items */
73 ta_face_globals_new(FT_Face face
,
74 TA_FaceGlobals
*aglobals
,
78 ta_face_globals_get_metrics(TA_FaceGlobals globals
,
81 TA_StyleMetrics
*ametrics
);
84 ta_face_globals_free(TA_FaceGlobals globals
);
87 ta_face_globals_is_digit(TA_FaceGlobals globals
,
90 #endif /* __TAGLOBAL_H__ */
92 /* end of taglobal.h */