nuclear@0: /***************************************************************************/ nuclear@0: /* */ nuclear@0: /* ftotval.h */ nuclear@0: /* */ nuclear@0: /* FreeType API for validating OpenType tables (specification). */ nuclear@0: /* */ nuclear@0: /* Copyright 2004, 2005, 2006, 2007 by */ nuclear@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ nuclear@0: /* */ nuclear@0: /* This file is part of the FreeType project, and may only be used, */ nuclear@0: /* modified, and distributed under the terms of the FreeType project */ nuclear@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ nuclear@0: /* this file you indicate that you have read the license and */ nuclear@0: /* understand and accept it fully. */ nuclear@0: /* */ nuclear@0: /***************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /***************************************************************************/ nuclear@0: /* */ nuclear@0: /* */ nuclear@0: /* Warning: This module might be moved to a different library in the */ nuclear@0: /* future to avoid a tight dependency between FreeType and the */ nuclear@0: /* OpenType specification. */ nuclear@0: /* */ nuclear@0: /* */ nuclear@0: /***************************************************************************/ nuclear@0: nuclear@0: nuclear@0: #ifndef __FTOTVAL_H__ nuclear@0: #define __FTOTVAL_H__ nuclear@0: nuclear@0: #include nuclear@0: #include FT_FREETYPE_H nuclear@0: nuclear@0: #ifdef FREETYPE_H nuclear@0: #error "freetype.h of FreeType 1 has been loaded!" nuclear@0: #error "Please fix the directory search order for header files" nuclear@0: #error "so that freetype.h of FreeType 2 is found first." nuclear@0: #endif nuclear@0: nuclear@0: nuclear@0: FT_BEGIN_HEADER nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /*
*/ nuclear@0: /* ot_validation */ nuclear@0: /* */ nuclear@0: /* */ nuclear@0: /* OpenType Validation */ nuclear@0: /* */ nuclear@0: /* <Abstract> */ nuclear@0: /* An API to validate OpenType tables. */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* This section contains the declaration of functions to validate */ nuclear@0: /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ nuclear@0: /* */ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /********************************************************************** nuclear@0: * nuclear@0: * @enum: nuclear@0: * FT_VALIDATE_OTXXX nuclear@0: * nuclear@0: * @description: nuclear@0: * A list of bit-field constants used with @FT_OpenType_Validate to nuclear@0: * indicate which OpenType tables should be validated. nuclear@0: * nuclear@0: * @values: nuclear@0: * FT_VALIDATE_BASE :: nuclear@0: * Validate BASE table. nuclear@0: * nuclear@0: * FT_VALIDATE_GDEF :: nuclear@0: * Validate GDEF table. nuclear@0: * nuclear@0: * FT_VALIDATE_GPOS :: nuclear@0: * Validate GPOS table. nuclear@0: * nuclear@0: * FT_VALIDATE_GSUB :: nuclear@0: * Validate GSUB table. nuclear@0: * nuclear@0: * FT_VALIDATE_JSTF :: nuclear@0: * Validate JSTF table. nuclear@0: * nuclear@0: * FT_VALIDATE_MATH :: nuclear@0: * Validate MATH table. nuclear@0: * nuclear@0: * FT_VALIDATE_OT :: nuclear@0: * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). nuclear@0: * nuclear@0: */ nuclear@0: #define FT_VALIDATE_BASE 0x0100 nuclear@0: #define FT_VALIDATE_GDEF 0x0200 nuclear@0: #define FT_VALIDATE_GPOS 0x0400 nuclear@0: #define FT_VALIDATE_GSUB 0x0800 nuclear@0: #define FT_VALIDATE_JSTF 0x1000 nuclear@0: #define FT_VALIDATE_MATH 0x2000 nuclear@0: nuclear@0: #define FT_VALIDATE_OT FT_VALIDATE_BASE | \ nuclear@0: FT_VALIDATE_GDEF | \ nuclear@0: FT_VALIDATE_GPOS | \ nuclear@0: FT_VALIDATE_GSUB | \ nuclear@0: FT_VALIDATE_JSTF | \ nuclear@0: FT_VALIDATE_MATH nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: /********************************************************************** nuclear@0: * nuclear@0: * @function: nuclear@0: * FT_OpenType_Validate nuclear@0: * nuclear@0: * @description: nuclear@0: * Validate various OpenType tables to assure that all offsets and nuclear@0: * indices are valid. The idea is that a higher-level library which nuclear@0: * actually does the text layout can access those tables without nuclear@0: * error checking (which can be quite time consuming). nuclear@0: * nuclear@0: * @input: nuclear@0: * face :: nuclear@0: * A handle to the input face. nuclear@0: * nuclear@0: * validation_flags :: nuclear@0: * A bit field which specifies the tables to be validated. See nuclear@0: * @FT_VALIDATE_OTXXX for possible values. nuclear@0: * nuclear@0: * @output: nuclear@0: * BASE_table :: nuclear@0: * A pointer to the BASE table. nuclear@0: * nuclear@0: * GDEF_table :: nuclear@0: * A pointer to the GDEF table. nuclear@0: * nuclear@0: * GPOS_table :: nuclear@0: * A pointer to the GPOS table. nuclear@0: * nuclear@0: * GSUB_table :: nuclear@0: * A pointer to the GSUB table. nuclear@0: * nuclear@0: * JSTF_table :: nuclear@0: * A pointer to the JSTF table. nuclear@0: * nuclear@0: * @return: nuclear@0: * FreeType error code. 0~means success. nuclear@0: * nuclear@0: * @note: nuclear@0: * This function only works with OpenType fonts, returning an error nuclear@0: * otherwise. nuclear@0: * nuclear@0: * After use, the application should deallocate the five tables with nuclear@0: * @FT_OpenType_Free. A NULL value indicates that the table either nuclear@0: * doesn't exist in the font, or the application hasn't asked for nuclear@0: * validation. nuclear@0: */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FT_OpenType_Validate( FT_Face face, nuclear@0: FT_UInt validation_flags, nuclear@0: FT_Bytes *BASE_table, nuclear@0: FT_Bytes *GDEF_table, nuclear@0: FT_Bytes *GPOS_table, nuclear@0: FT_Bytes *GSUB_table, nuclear@0: FT_Bytes *JSTF_table ); nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: /********************************************************************** nuclear@0: * nuclear@0: * @function: nuclear@0: * FT_OpenType_Free nuclear@0: * nuclear@0: * @description: nuclear@0: * Free the buffer allocated by OpenType validator. nuclear@0: * nuclear@0: * @input: nuclear@0: * face :: nuclear@0: * A handle to the input face. nuclear@0: * nuclear@0: * table :: nuclear@0: * The pointer to the buffer that is allocated by nuclear@0: * @FT_OpenType_Validate. nuclear@0: * nuclear@0: * @note: nuclear@0: * This function must be used to free the buffer allocated by nuclear@0: * @FT_OpenType_Validate only. nuclear@0: */ nuclear@0: FT_EXPORT( void ) nuclear@0: FT_OpenType_Free( FT_Face face, nuclear@0: FT_Bytes table ); nuclear@0: nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: nuclear@0: FT_END_HEADER nuclear@0: nuclear@0: #endif /* __FTOTVAL_H__ */ nuclear@0: nuclear@0: nuclear@0: /* END */