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__
25 #include "taharfbuzz.h"
28 extern TA_WritingSystemClass
const ta_writing_system_classes
[];
32 #define SCRIPT(s, S, d, h, sc1, sc2, sc3) \
33 extern const TA_ScriptClassRec ta_ ## s ## _script_class;
35 #include "ttfautohint-scripts.h"
37 extern TA_ScriptClass
const ta_script_classes
[];
41 #define STYLE(s, S, d, ws, sc, ss, c) \
42 extern const TA_StyleClassRec ta_ ## s ## _style_class;
46 extern TA_StyleClass
const ta_style_classes
[];
50 extern const char* ta_style_names
[];
54 /* Default values and flags for both autofitter globals */
55 /* (originally found in AF_ModuleRec, we use FONT instead) */
56 /* and face globals (in TA_FaceGlobalsRec). */
58 /* index of fallback style in `ta_style_classes' */
59 #define TA_STYLE_FALLBACK TA_STYLE_NONE_DFLT
60 /* default script for OpenType */
61 #define TA_SCRIPT_DEFAULT AF_SCRIPT_LATN
62 /* a bit mask indicating an uncovered glyph */
63 #define TA_STYLE_UNASSIGNED 0x7F
64 /* if this flag is set, we have an ASCII digit */
67 /* `increase-x-height' property */
68 #define TA_PROP_INCREASE_X_HEIGHT_MIN 6
69 #define TA_PROP_INCREASE_X_HEIGHT_MAX 0
72 /* note that glyph_styles[] maps each glyph to an index into the */
73 /* `ta_style_classes' array. */
74 typedef struct TA_FaceGlobalsRec_
77 FT_Long glyph_count
; /* same as face->num_glyphs */
78 FT_Byte
* glyph_styles
;
82 /* per-face auto-hinter properties */
83 FT_UInt increase_x_height
;
85 TA_StyleMetrics metrics
[TA_STYLE_MAX
];
87 FONT
* font
; /* to access global properties */
91 /* this models the global hints data for a given face, */
92 /* decomposed into style-specific items */
95 ta_face_globals_new(FT_Face face
,
96 TA_FaceGlobals
*aglobals
,
100 ta_face_globals_get_metrics(TA_FaceGlobals globals
,
103 TA_StyleMetrics
*ametrics
);
106 ta_face_globals_free(TA_FaceGlobals globals
);
109 ta_face_globals_is_digit(TA_FaceGlobals globals
,
112 #endif /* __TAGLOBAL_H__ */
114 /* end of taglobal.h */