Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / thirdparty / freetype-2.3.12 / include / freetype / ftotval.h
blob027f2e886579b24d6516c0a4d08001ed32947037
1 /***************************************************************************/
2 /* */
3 /* ftotval.h */
4 /* */
5 /* FreeType API for validating OpenType tables (specification). */
6 /* */
7 /* Copyright 2004, 2005, 2006, 2007 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
19 /***************************************************************************/
20 /* */
21 /* */
22 /* Warning: This module might be moved to a different library in the */
23 /* future to avoid a tight dependency between FreeType and the */
24 /* OpenType specification. */
25 /* */
26 /* */
27 /***************************************************************************/
30 #ifndef __FTOTVAL_H__
31 #define __FTOTVAL_H__
33 #include <ft2build.h>
34 #include FT_FREETYPE_H
36 #ifdef FREETYPE_H
37 #error "freetype.h of FreeType 1 has been loaded!"
38 #error "Please fix the directory search order for header files"
39 #error "so that freetype.h of FreeType 2 is found first."
40 #endif
43 FT_BEGIN_HEADER
46 /*************************************************************************/
47 /* */
48 /* <Section> */
49 /* ot_validation */
50 /* */
51 /* <Title> */
52 /* OpenType Validation */
53 /* */
54 /* <Abstract> */
55 /* An API to validate OpenType tables. */
56 /* */
57 /* <Description> */
58 /* This section contains the declaration of functions to validate */
59 /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */
60 /* */
61 /*************************************************************************/
64 /**********************************************************************
66 * @enum:
67 * FT_VALIDATE_OTXXX
69 * @description:
70 * A list of bit-field constants used with @FT_OpenType_Validate to
71 * indicate which OpenType tables should be validated.
73 * @values:
74 * FT_VALIDATE_BASE ::
75 * Validate BASE table.
77 * FT_VALIDATE_GDEF ::
78 * Validate GDEF table.
80 * FT_VALIDATE_GPOS ::
81 * Validate GPOS table.
83 * FT_VALIDATE_GSUB ::
84 * Validate GSUB table.
86 * FT_VALIDATE_JSTF ::
87 * Validate JSTF table.
89 * FT_VALIDATE_MATH ::
90 * Validate MATH table.
92 * FT_VALIDATE_OT ::
93 * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
96 #define FT_VALIDATE_BASE 0x0100
97 #define FT_VALIDATE_GDEF 0x0200
98 #define FT_VALIDATE_GPOS 0x0400
99 #define FT_VALIDATE_GSUB 0x0800
100 #define FT_VALIDATE_JSTF 0x1000
101 #define FT_VALIDATE_MATH 0x2000
103 #define FT_VALIDATE_OT FT_VALIDATE_BASE | \
104 FT_VALIDATE_GDEF | \
105 FT_VALIDATE_GPOS | \
106 FT_VALIDATE_GSUB | \
107 FT_VALIDATE_JSTF | \
108 FT_VALIDATE_MATH
110 /* */
112 /**********************************************************************
114 * @function:
115 * FT_OpenType_Validate
117 * @description:
118 * Validate various OpenType tables to assure that all offsets and
119 * indices are valid. The idea is that a higher-level library which
120 * actually does the text layout can access those tables without
121 * error checking (which can be quite time consuming).
123 * @input:
124 * face ::
125 * A handle to the input face.
127 * validation_flags ::
128 * A bit field which specifies the tables to be validated. See
129 * @FT_VALIDATE_OTXXX for possible values.
131 * @output:
132 * BASE_table ::
133 * A pointer to the BASE table.
135 * GDEF_table ::
136 * A pointer to the GDEF table.
138 * GPOS_table ::
139 * A pointer to the GPOS table.
141 * GSUB_table ::
142 * A pointer to the GSUB table.
144 * JSTF_table ::
145 * A pointer to the JSTF table.
147 * @return:
148 * FreeType error code. 0~means success.
150 * @note:
151 * This function only works with OpenType fonts, returning an error
152 * otherwise.
154 * After use, the application should deallocate the five tables with
155 * @FT_OpenType_Free. A NULL value indicates that the table either
156 * doesn't exist in the font, or the application hasn't asked for
157 * validation.
159 FT_EXPORT( FT_Error )
160 FT_OpenType_Validate( FT_Face face,
161 FT_UInt validation_flags,
162 FT_Bytes *BASE_table,
163 FT_Bytes *GDEF_table,
164 FT_Bytes *GPOS_table,
165 FT_Bytes *GSUB_table,
166 FT_Bytes *JSTF_table );
168 /* */
170 /**********************************************************************
172 * @function:
173 * FT_OpenType_Free
175 * @description:
176 * Free the buffer allocated by OpenType validator.
178 * @input:
179 * face ::
180 * A handle to the input face.
182 * table ::
183 * The pointer to the buffer that is allocated by
184 * @FT_OpenType_Validate.
186 * @note:
187 * This function must be used to free the buffer allocated by
188 * @FT_OpenType_Validate only.
190 FT_EXPORT( void )
191 FT_OpenType_Free( FT_Face face,
192 FT_Bytes table );
195 /* */
198 FT_END_HEADER
200 #endif /* __FTOTVAL_H__ */
203 /* END */