4 * Copyright (C) 2011-2013 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_ScriptClass
const ta_script_classes
[];
31 extern const char* ta_script_names
[];
35 /* Default values and flags for both autofitter globals */
36 /* (originally found in AF_ModuleRec, we use FONT instead) */
37 /* and face globals (in TA_FaceGlobalsRec). */
39 /* index of fallback script in `ta_script_classes' */
40 #define TA_SCRIPT_FALLBACK TA_SCRIPT_DFLT
41 /* a bit mask indicating an uncovered glyph */
42 #define TA_SCRIPT_NONE 0x7F
43 /* if this flag is set, we have an ASCII digit */
46 /* `increase-x-height' property */
47 #define TA_PROP_INCREASE_X_HEIGHT_MIN 6
48 #define TA_PROP_INCREASE_X_HEIGHT_MAX 0
51 /* note that glyph_scripts[] maps each glyph to an index into the */
52 /* `ta_script_classes' array. */
53 typedef struct TA_FaceGlobalsRec_
56 FT_Long glyph_count
; /* same as face->num_glyphs */
57 FT_Byte
* glyph_scripts
;
59 /* per-face auto-hinter properties */
60 FT_UInt increase_x_height
;
62 TA_ScriptMetrics metrics
[TA_SCRIPT_MAX
];
64 FONT
* font
; /* to access global properties */
68 /* this models the global hints data for a given face, */
69 /* decomposed into script-specific items */
72 ta_face_globals_new(FT_Face face
,
73 TA_FaceGlobals
*aglobals
,
77 ta_face_globals_get_metrics(TA_FaceGlobals globals
,
80 TA_ScriptMetrics
*ametrics
);
83 ta_face_globals_free(TA_FaceGlobals globals
);
86 ta_face_globals_is_digit(TA_FaceGlobals globals
,
89 #endif /* __TAGLOBAL_H__ */
91 /* end of taglobal.h */