Subversion Repositories Kolibri OS

Rev

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
OpenType Validation
42
43

Synopsis

44
45
FT_VALIDATE_OTXXXFT_OpenType_ValidateFT_OpenType_Free
46


47
 
48
49

This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).

50

51
52

FT_VALIDATE_OTXXX

53
54
Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
55

56
57
 
58
#define FT_VALIDATE_BASE  0x0100
59
#define FT_VALIDATE_GDEF  0x0200
60
#define FT_VALIDATE_GPOS  0x0400
61
#define FT_VALIDATE_GSUB  0x0800
62
#define FT_VALIDATE_JSTF  0x1000
63
#define FT_VALIDATE_MATH  0x2000
64
 
65
#define FT_VALIDATE_OT  FT_VALIDATE_BASE | \
66
                        FT_VALIDATE_GDEF | \
67
                        FT_VALIDATE_GPOS | \
68
                        FT_VALIDATE_GSUB | \
69
                        FT_VALIDATE_JSTF | \
70
                        FT_VALIDATE_MATH
71
 
72

73
74

A list of bit-field constants used with FT_OpenType_Validate to indicate which OpenType tables should be validated.

75

76
values
77

78
79
FT_VALIDATE_BASE
80

Validate BASE table.

81
82
FT_VALIDATE_GDEF
83

Validate GDEF table.

84
85
FT_VALIDATE_GPOS
86

Validate GPOS table.

87
88
FT_VALIDATE_GSUB
89

Validate GSUB table.

90
91
FT_VALIDATE_JSTF
92

Validate JSTF table.

93
94
FT_VALIDATE_MATH
95

Validate MATH table.

96
97
FT_VALIDATE_OT
98

Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).

99
100
101
102
103

104
[Index]
105
106
[TOC]
107
 
108
109

FT_OpenType_Validate

110
111
Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
112

113
114
 
115
  FT_EXPORT( FT_Error )
116
  FT_OpenType_Validate( FT_Face    face,
117
                        FT_UInt    validation_flags,
118
                        FT_Bytes  *BASE_table,
119
                        FT_Bytes  *GDEF_table,
120
                        FT_Bytes  *GPOS_table,
121
                        FT_Bytes  *GSUB_table,
122
                        FT_Bytes  *JSTF_table );
123
 
124

125
126

Validate various OpenType 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).

127

128
input
129

130
131
face
132

A handle to the input face.

133
134
validation_flags
135

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

136
137
138
139
output
140

141
142
BASE_table
143

A pointer to the BASE table.

144
145
GDEF_table
146

A pointer to the GDEF table.

147
148
GPOS_table
149

A pointer to the GPOS table.

150
151
GSUB_table
152

A pointer to the GSUB table.

153
154
JSTF_table
155

A pointer to the JSTF table.

156
157
158
159
return
160

FreeType error code. 0 means success.

161
162
note
163

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

164

After use, the application should deallocate the five tables with FT_OpenType_Free. A NULL value indicates that the table either doesn't exist in the font, or the application hasn't asked for validation.

165
166
167

168
[Index]
169
170
[TOC]
171
 
172
173

FT_OpenType_Free

174
175
Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).
176

177
178
 
179
  FT_EXPORT( void )
180
  FT_OpenType_Free( FT_Face   face,
181
                    FT_Bytes  table );
182
 
183

184
185

Free the buffer allocated by OpenType validator.

186

187
input
188

189
190
face
191

A handle to the input face.

192
193
table
194

The pointer to the buffer that is allocated by FT_OpenType_Validate.

195
196
197
198
note
199

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

200
201
202

203
[Index]
204
205
[TOC]
206
 
207
208