4 * Copyright (C) 2011-2017 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> */
28 extern TA_WritingSystemClass
const ta_writing_system_classes
[];
32 #define SCRIPT(s, S, d, h, H, ss) \
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 TA_SCRIPT_LATN
63 /* a bit mask for TA_DIGIT and TA_NONBASE */
64 #define TA_STYLE_MASK 0x3FFF
65 /* an uncovered glyph */
66 #define TA_STYLE_UNASSIGNED TA_STYLE_MASK
68 /* if this flag is set, we have an ASCII digit */
69 #define TA_DIGIT 0x8000U
70 /* if this flag is set, we have a non-base character */
71 #define TA_NONBASE 0x4000U
73 /* `increase-x-height' property */
74 #define TA_PROP_INCREASE_X_HEIGHT_MIN 6
75 #define TA_PROP_INCREASE_X_HEIGHT_MAX 0
78 /* note that glyph_styles[] maps each glyph to an index into the */
79 /* `ta_style_classes' array. */
80 typedef struct TA_FaceGlobalsRec_
83 FT_Long glyph_count
; /* same as face->num_glyphs */
84 FT_UShort
* glyph_styles
;
87 hb_buffer_t
* hb_buf
; /* for feature comparison */
89 /* per-face auto-hinter properties */
90 FT_UInt increase_x_height
;
92 TA_StyleMetrics metrics
[TA_STYLE_MAX
];
93 FT_UInt sample_glyphs
[TA_STYLE_MAX
]; /* per-style sample glyph indices */
95 FONT
* font
; /* to access global properties */
99 /* this models the global hints data for a given face, */
100 /* decomposed into style-specific items */
103 ta_face_globals_new(FT_Face face
,
104 TA_FaceGlobals
*aglobals
,
108 ta_face_globals_get_metrics(TA_FaceGlobals globals
,
111 TA_StyleMetrics
*ametrics
);
114 ta_face_globals_free(TA_FaceGlobals globals
);
117 ta_face_globals_is_digit(TA_FaceGlobals globals
,
120 #endif /* TAGLOBAL_H_ */
122 /* end of taglobal.h */