Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed






















Rev Author Line No. Line
4349 Serge 1
2
"http://www.w3.org/TR/html4/loose.dtd">
3
4
5
6
FreeType-2.5.0 API Reference
7
32
33
34
 
35
[Index]
36
37
[TOC]
38

FreeType-2.5.0 API Reference

39
 
40

41
TrueTypeGX/AAT Validation
42
43

Synopsis

44
45
FT_VALIDATE_GX_LENGTHFT_TrueTypeGX_FreeFT_ClassicKern_Free
46
FT_VALIDATE_GXXXXFT_VALIDATE_CKERNXXX
47
FT_TrueTypeGX_ValidateFT_ClassicKern_Validate
48


49
 
50
51

This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).

52

53
54

FT_VALIDATE_GX_LENGTH

55
56
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
57

58
59
 
60
#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)
61
 
62

63
64

The number of tables checked in this module. Use it as a parameter for the ‘table-length’ argument of function FT_TrueTypeGX_Validate.

65

66
67

68
[Index]
69
70
[TOC]
71
 
72
73

FT_VALIDATE_GXXXX

74
75
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
76

77
78
 
79
#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )
80
#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )
81
#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )
82
#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )
83
#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )
84
#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )
85
#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )
86
#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )
87
#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )
88
#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )
89
 
90
#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \
91
                          FT_VALIDATE_mort | \
92
                          FT_VALIDATE_morx | \
93
                          FT_VALIDATE_bsln | \
94
                          FT_VALIDATE_just | \
95
                          FT_VALIDATE_kern | \
96
                          FT_VALIDATE_opbd | \
97
                          FT_VALIDATE_trak | \
98
                          FT_VALIDATE_prop | \
99
                          FT_VALIDATE_lcar )
100
 
101

102
103

A list of bit-field constants used with FT_TrueTypeGX_Validate to indicate which TrueTypeGX/AAT Type tables should be validated.

104

105
values
106

107
108
FT_VALIDATE_feat
109

Validate ‘feat’ table.

110
111
FT_VALIDATE_mort
112

Validate ‘mort’ table.

113
114
FT_VALIDATE_morx
115

Validate ‘morx’ table.

116
117
FT_VALIDATE_bsln
118

Validate ‘bsln’ table.

119
120
FT_VALIDATE_just
121

Validate ‘just’ table.

122
123
FT_VALIDATE_kern
124

Validate ‘kern’ table.

125
126
FT_VALIDATE_opbd
127

Validate ‘opbd’ table.

128
129
FT_VALIDATE_trak
130

Validate ‘trak’ table.

131
132
FT_VALIDATE_prop
133

Validate ‘prop’ table.

134
135
FT_VALIDATE_lcar
136

Validate ‘lcar’ table.

137
138
FT_VALIDATE_GX
139

Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).

140
141
142
143
144

145
[Index]
146
147
[TOC]
148
 
149
150

FT_TrueTypeGX_Validate

151
152
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
153

154
155
 
156
  FT_EXPORT( FT_Error )
157
  FT_TrueTypeGX_Validate( FT_Face   face,
158
                          FT_UInt   validation_flags,
159
                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
160
                          FT_UInt   table_length );
161
 
162

163
164

Validate various TrueTypeGX tables to assure that all offsets and indices are valid. The idea is that a higher-level library which actually does the text layout can access those tables without error checking (which can be quite time consuming).

165

166
input
167

168
169
face
170

A handle to the input face.

171
172
validation_flags
173

A bit field which specifies the tables to be validated. See FT_VALIDATE_GXXXX for possible values.

174
175
table_length
176

The size of the ‘tables’ array. Normally, FT_VALIDATE_GX_LENGTH should be passed.

177
178
179
180
output
181

182
183
tables
184

The array where all validated sfnt tables are stored. The array itself must be allocated by a client.

185
186
187
188
return
189

FreeType error code. 0 means success.

190
191
note
192

This function only works with TrueTypeGX fonts, returning an error otherwise.

193

After use, the application should deallocate the buffers pointed to by each ‘tables’ element, by calling FT_TrueTypeGX_Free. A NULL value indicates that the table either doesn't exist in the font, the application hasn't asked for validation, or the validator doesn't have the ability to validate the sfnt table.

194
195
196

197
[Index]
198
199
[TOC]
200
 
201
202

FT_TrueTypeGX_Free

203
204
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
205

206
207
 
208
  FT_EXPORT( void )
209
  FT_TrueTypeGX_Free( FT_Face   face,
210
                      FT_Bytes  table );
211
 
212

213
214

Free the buffer allocated by TrueTypeGX validator.

215

216
input
217

218
219
face
220

A handle to the input face.

221
222
table
223

The pointer to the buffer allocated by FT_TrueTypeGX_Validate.

224
225
226
227
note
228

This function must be used to free the buffer allocated by FT_TrueTypeGX_Validate only.

229
230
231

232
[Index]
233
234
[TOC]
235
 
236
237

FT_VALIDATE_CKERNXXX

238
239
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
240

241
242
 
243
#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )
244
#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )
245
 
246
#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
247
 
248

249
250

A list of bit-field constants used with FT_ClassicKern_Validate to indicate the classic kern dialect or dialects. If the selected type doesn't fit, FT_ClassicKern_Validate regards the table as invalid.

251

252
values
253

254
255
FT_VALIDATE_MS
256

Handle the ‘kern’ table as a classic Microsoft kern table.

257
258
FT_VALIDATE_APPLE
259

Handle the ‘kern’ table as a classic Apple kern table.

260
261
FT_VALIDATE_CKERN
262

Handle the ‘kern’ as either classic Apple or Microsoft kern table.

263
264
265
266
267

268
[Index]
269
270
[TOC]
271
 
272
273

FT_ClassicKern_Validate

274
275
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
276

277
278
 
279
  FT_EXPORT( FT_Error )
280
  FT_ClassicKern_Validate( FT_Face    face,
281
                           FT_UInt    validation_flags,
282
                           FT_Bytes  *ckern_table );
283
 
284

285
286

Validate classic (16-bit format) kern table to assure that the offsets and indices are valid. The idea is that a higher-level library which actually does the text layout can access those tables without error checking (which can be quite time consuming).

287

The ‘kern’ table validator in FT_TrueTypeGX_Validate deals with both the new 32-bit format and the classic 16-bit format, while FT_ClassicKern_Validate only supports the classic 16-bit format.

288

289
input
290

291
292
face
293

A handle to the input face.

294
295
validation_flags
296

A bit field which specifies the dialect to be validated. See FT_VALIDATE_CKERNXXX for possible values.

297
298
299
300
output
301

302
303
ckern_table
304

A pointer to the kern table.

305
306
307
308
return
309

FreeType error code. 0 means success.

310
311
note
312

After use, the application should deallocate the buffers pointed to by ‘ckern_table’, by calling FT_ClassicKern_Free. A NULL value indicates that the table doesn't exist in the font.

313
314
315

316
[Index]
317
318
[TOC]
319
 
320
321

FT_ClassicKern_Free

322
323
Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).
324

325
326
 
327
  FT_EXPORT( void )
328
  FT_ClassicKern_Free( FT_Face   face,
329
                       FT_Bytes  table );
330
 
331

332
333

Free the buffer allocated by classic Kern validator.

334

335
input
336

337
338
face
339

A handle to the input face.

340
341
table
342

The pointer to the buffer that is allocated by FT_ClassicKern_Validate.

343
344
345
346
note
347

This function must be used to free the buffer allocated by FT_ClassicKern_Validate only.

348
349
350

351
[Index]
352
353
[TOC]
354
 
355
356