FreeType-2.1.10 API Reference
OpenType Validation
Synopsis
#FT_VALIDATE_XXX
FT_VALIDATE_XXX
#FT_OpenType_Validate
FT_OpenType_Validate
This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).
FT_VALIDATE_XXX
#define
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_BASE
0x0100
#define
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_GDEF
0x0200
#define
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_GPOS
0x0400
#define
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_GSUB
0x0800
#define
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_JSTF
0x1000
#define
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_OT
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_BASE
| \
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_GDEF
| \
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_GPOS
| \
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_GSUB
| \
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_JSTF
A list of bit-field constants used with
ft2-ot_validation.html#FT_OpenType_Validate
FT_OpenType_Validate
to indicate which OpenType tables should be validated.
values
FT_VALIDATE_BASE
Validate BASE table.
FT_VALIDATE_GDEF
Validate GDEF table.
FT_VALIDATE_GPOS
Validate GPOS table.
FT_VALIDATE_GSUB
Validate GSUB table.
FT_VALIDATE_JSTF
Validate JSTF table.
FT_VALIDATE_OT
Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF).
FT_OpenType_Validate
FT_EXPORT(
ft2-basic_types.html#FT_Error
FT_Error
)
FT_OpenType_Validate
(
ft2-base_interface.html#FT_Face
FT_Face
face,
ft2-basic_types.html#FT_UInt
FT_UInt
validation_flags,
ft2-basic_types.html#FT_Bytes
FT_Bytes
*BASE_table,
ft2-basic_types.html#FT_Bytes
FT_Bytes
*GDEF_table,
ft2-basic_types.html#FT_Bytes
FT_Bytes
*GPOS_table,
ft2-basic_types.html#FT_Bytes
FT_Bytes
*GSUB_table,
ft2-basic_types.html#FT_Bytes
FT_Bytes
*JSTF_table );
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).
input
face
A handle to the input face.
validation_flags
A bit field which specifies the tables to be validated. See
ft2-ot_validation.html#FT_VALIDATE_XXX
FT_VALIDATE_XXX
for possible values.
output
BASE_table
A pointer to the BASE table.
GDEF_table
A pointer to the GDEF table.
GPOS_table
A pointer to the GPOS table.
GSUB_table
A pointer to the GSUB table.
JSTF_table
A pointer to the JSTF table.
return
FreeType error code. 0 means success.
note
This function only works with OpenType fonts, returning an error otherwise.
After use, the application should deallocate the five tables with `free'. A NULL value indicates that the table either doesn't exist in the font, or the application hasn't asked for validation.
