1
/***************************************************************************/
5
/* OpenType layout support, common tables (specification). */
7
/* Copyright 2002 by */
8
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
16
/***************************************************************************/
19
#ifndef __OTLCOMMN_H__
20
#define __OTLCOMMN_H__
27
/*************************************************************************/
28
/*************************************************************************/
30
/***** COVERAGE TABLE *****/
32
/*************************************************************************/
33
/*************************************************************************/
35
/* validate coverage table */
37
otl_coverage_validate( OTL_Bytes base,
38
OTL_Validator valid );
40
/* return number of covered glyphs */
41
OTL_LOCALDEF( OTL_UInt )
42
otl_coverage_get_count( OTL_Bytes base );
44
/* Return the coverage index corresponding to a glyph glyph index. */
45
/* Return -1 if the glyph isn't covered. */
46
OTL_LOCALDEF( OTL_Int )
47
otl_coverage_get_index( OTL_Bytes base,
48
OTL_UInt glyph_index );
51
/*************************************************************************/
52
/*************************************************************************/
54
/***** CLASS DEFINITION TABLE *****/
56
/*************************************************************************/
57
/*************************************************************************/
59
/* validate class definition table */
61
otl_class_definition_validate( OTL_Bytes table,
62
OTL_Validator valid );
64
/* return class value for a given glyph index */
65
OTL_LOCALDEF( OTL_UInt )
66
otl_class_definition_get_value( OTL_Bytes table,
67
OTL_UInt glyph_index );
70
/*************************************************************************/
71
/*************************************************************************/
73
/***** DEVICE TABLE *****/
75
/*************************************************************************/
76
/*************************************************************************/
78
/* validate a device table */
80
otl_device_table_validate( OTL_Bytes table,
81
OTL_Validator valid );
83
/* return a device table's first size */
84
OTL_LOCALDEF( OTL_UInt )
85
otl_device_table_get_start( OTL_Bytes table );
87
/* return a device table's last size */
88
OTL_LOCALDEF( OTL_UInt )
89
otl_device_table_get_end( OTL_Bytes table );
91
/* return pixel adjustment for a given size */
92
OTL_LOCALDEF( OTL_Int )
93
otl_device_table_get_delta( OTL_Bytes table,
97
/*************************************************************************/
98
/*************************************************************************/
100
/***** LOOKUPS *****/
102
/*************************************************************************/
103
/*************************************************************************/
105
/* validate lookup table */
107
otl_lookup_validate( OTL_Bytes table,
108
OTL_Validator valid );
110
/* return number of sub-tables in a lookup */
111
OTL_LOCALDEF( OTL_UInt )
112
otl_lookup_get_count( OTL_Bytes table );
115
/* return lookup sub-table */
116
OTL_LOCALDEF( OTL_Bytes )
117
otl_lookup_get_table( OTL_Bytes table,
121
/*************************************************************************/
122
/*************************************************************************/
124
/***** LOOKUP LISTS *****/
126
/*************************************************************************/
127
/*************************************************************************/
129
/* validate lookup list */
131
otl_lookup_list_validate( OTL_Bytes table,
132
OTL_Validator valid );
134
/* return number of lookups in list */
135
OTL_LOCALDEF( OTL_UInt )
136
otl_lookup_list_get_count( OTL_Bytes table );
138
/* return a given lookup from a list */
139
OTL_LOCALDEF( OTL_Bytes )
140
otl_lookup_list_get_lookup( OTL_Bytes table,
143
/* return lookup sub-table from a list */
144
OTL_LOCALDEF( OTL_Bytes )
145
otl_lookup_list_get_table( OTL_Bytes table,
146
OTL_UInt lookup_index,
147
OTL_UInt table_index );
149
/* iterate over lookup list */
151
otl_lookup_list_foreach( OTL_Bytes table,
152
OTL_ForeachFunc func,
153
OTL_Pointer func_data );
156
/*************************************************************************/
157
/*************************************************************************/
159
/***** FEATURES *****/
161
/*************************************************************************/
162
/*************************************************************************/
164
/* validate feature table */
166
otl_feature_validate( OTL_Bytes table,
167
OTL_Validator valid );
169
/* return feature's lookup count */
170
OTL_LOCALDEF( OTL_UInt )
171
otl_feature_get_count( OTL_Bytes table );
173
/* get several lookups indices from a feature. returns the number of */
174
/* lookups grabbed */
175
OTL_LOCALDEF( OTL_UInt )
176
otl_feature_get_lookups( OTL_Bytes table,
182
/*************************************************************************/
183
/*************************************************************************/
185
/***** FEATURE LIST *****/
187
/*************************************************************************/
188
/*************************************************************************/
190
/* validate a feature list */
192
otl_feature_list_validate( OTL_Bytes table,
193
OTL_Validator valid );
195
/* return number of features in list */
196
OTL_LOCALDEF( OTL_UInt )
197
otl_feature_list_get_count( OTL_Bytes table );
200
/* return a given feature from a list */
201
OTL_LOCALDEF( OTL_Bytes )
202
otl_feature_list_get_feature( OTL_Bytes table,
205
/* iterate over all features in a list */
207
otl_feature_list_foreach( OTL_Bytes table,
208
OTL_ForeachFunc func,
209
OTL_Pointer func_data );
212
/*************************************************************************/
213
/*************************************************************************/
215
/***** LANGUAGE SYSTEM *****/
217
/*************************************************************************/
218
/*************************************************************************/
221
otl_lang_validate( OTL_Bytes table,
222
OTL_Validator valid );
225
OTL_LOCAL( OTL_UInt )
226
otl_lang_get_req_feature( OTL_Bytes table );
229
OTL_LOCAL( OTL_UInt )
230
otl_lang_get_count( OTL_Bytes table );
233
OTL_LOCAL( OTL_UInt )
234
otl_lang_get_features( OTL_Bytes table,
237
OTL_UInt *features );
240
/*************************************************************************/
241
/*************************************************************************/
243
/***** SCRIPTS *****/
245
/*************************************************************************/
246
/*************************************************************************/
249
otl_script_list_validate( OTL_Bytes list,
250
OTL_Validator valid );
252
OTL_LOCAL( OTL_Bytes )
253
otl_script_list_get_script( OTL_Bytes table );
256
/*************************************************************************/
257
/*************************************************************************/
259
/***** LOOKUP LISTS *****/
261
/*************************************************************************/
262
/*************************************************************************/
265
otl_lookup_list_validate( OTL_Bytes list,
267
OTL_ValidateFunc* type_funcs,
268
OTL_Validator valid );
274
#endif /* __OTLCOMMN_H__ */