Synchronize with FreeType.
[ttfautohint.git] / lib / taglobal.h
blob6ebd1a9387b8a9336372c68beca912e73f66115f
1 /* taglobal.h */
3 /*
4 * Copyright (C) 2011-2012 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__
23 #include "ta.h"
24 #include "tatypes.h"
27 /* index of fallback script in `ta_script_classes' */
28 #define TA_SCRIPT_FALLBACK 0
29 /* a bit mask indicating an uncovered glyph */
30 #define TA_SCRIPT_NONE 0x7F
31 /* if this flag is set, we have an ASCII digit */
32 #define TA_DIGIT 0x80
35 /* note that glyph_scripts[] is used to map each glyph into */
36 /* an index into the `ta_script_classes' array. */
37 typedef struct TA_FaceGlobalsRec_
39 FT_Face face;
40 FT_Long glyph_count; /* same as face->num_glyphs */
41 FT_Byte* glyph_scripts;
43 TA_ScriptMetrics metrics[TA_SCRIPT_MAX];
45 FONT* font; /* to access global properties */
46 } TA_FaceGlobalsRec;
49 /* this models the global hints data for a given face, */
50 /* decomposed into script-specific items */
52 FT_Error
53 ta_face_globals_new(FT_Face face,
54 TA_FaceGlobals *aglobals,
55 FONT* font);
57 FT_Error
58 ta_face_globals_get_metrics(TA_FaceGlobals globals,
59 FT_UInt gindex,
60 FT_UInt options,
61 TA_ScriptMetrics *ametrics);
63 void
64 ta_face_globals_free(TA_FaceGlobals globals);
66 FT_Bool
67 ta_face_globals_is_digit(TA_FaceGlobals globals,
68 FT_UInt gindex);
70 #endif /* __TAGLOBAL_H__ */
72 /* end of taglobal.h */