vrshoot

annotate libs/ft2static/freetype/ftotval.h @ 1:e7ca128b8713

looks nice :)
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 00:35:22 +0200
parents
children
rev   line source
nuclear@0 1 /***************************************************************************/
nuclear@0 2 /* */
nuclear@0 3 /* ftotval.h */
nuclear@0 4 /* */
nuclear@0 5 /* FreeType API for validating OpenType tables (specification). */
nuclear@0 6 /* */
nuclear@0 7 /* Copyright 2004, 2005, 2006, 2007 by */
nuclear@0 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
nuclear@0 9 /* */
nuclear@0 10 /* This file is part of the FreeType project, and may only be used, */
nuclear@0 11 /* modified, and distributed under the terms of the FreeType project */
nuclear@0 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
nuclear@0 13 /* this file you indicate that you have read the license and */
nuclear@0 14 /* understand and accept it fully. */
nuclear@0 15 /* */
nuclear@0 16 /***************************************************************************/
nuclear@0 17
nuclear@0 18
nuclear@0 19 /***************************************************************************/
nuclear@0 20 /* */
nuclear@0 21 /* */
nuclear@0 22 /* Warning: This module might be moved to a different library in the */
nuclear@0 23 /* future to avoid a tight dependency between FreeType and the */
nuclear@0 24 /* OpenType specification. */
nuclear@0 25 /* */
nuclear@0 26 /* */
nuclear@0 27 /***************************************************************************/
nuclear@0 28
nuclear@0 29
nuclear@0 30 #ifndef __FTOTVAL_H__
nuclear@0 31 #define __FTOTVAL_H__
nuclear@0 32
nuclear@0 33 #include <ft2build.h>
nuclear@0 34 #include FT_FREETYPE_H
nuclear@0 35
nuclear@0 36 #ifdef FREETYPE_H
nuclear@0 37 #error "freetype.h of FreeType 1 has been loaded!"
nuclear@0 38 #error "Please fix the directory search order for header files"
nuclear@0 39 #error "so that freetype.h of FreeType 2 is found first."
nuclear@0 40 #endif
nuclear@0 41
nuclear@0 42
nuclear@0 43 FT_BEGIN_HEADER
nuclear@0 44
nuclear@0 45
nuclear@0 46 /*************************************************************************/
nuclear@0 47 /* */
nuclear@0 48 /* <Section> */
nuclear@0 49 /* ot_validation */
nuclear@0 50 /* */
nuclear@0 51 /* <Title> */
nuclear@0 52 /* OpenType Validation */
nuclear@0 53 /* */
nuclear@0 54 /* <Abstract> */
nuclear@0 55 /* An API to validate OpenType tables. */
nuclear@0 56 /* */
nuclear@0 57 /* <Description> */
nuclear@0 58 /* This section contains the declaration of functions to validate */
nuclear@0 59 /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */
nuclear@0 60 /* */
nuclear@0 61 /*************************************************************************/
nuclear@0 62
nuclear@0 63
nuclear@0 64 /**********************************************************************
nuclear@0 65 *
nuclear@0 66 * @enum:
nuclear@0 67 * FT_VALIDATE_OTXXX
nuclear@0 68 *
nuclear@0 69 * @description:
nuclear@0 70 * A list of bit-field constants used with @FT_OpenType_Validate to
nuclear@0 71 * indicate which OpenType tables should be validated.
nuclear@0 72 *
nuclear@0 73 * @values:
nuclear@0 74 * FT_VALIDATE_BASE ::
nuclear@0 75 * Validate BASE table.
nuclear@0 76 *
nuclear@0 77 * FT_VALIDATE_GDEF ::
nuclear@0 78 * Validate GDEF table.
nuclear@0 79 *
nuclear@0 80 * FT_VALIDATE_GPOS ::
nuclear@0 81 * Validate GPOS table.
nuclear@0 82 *
nuclear@0 83 * FT_VALIDATE_GSUB ::
nuclear@0 84 * Validate GSUB table.
nuclear@0 85 *
nuclear@0 86 * FT_VALIDATE_JSTF ::
nuclear@0 87 * Validate JSTF table.
nuclear@0 88 *
nuclear@0 89 * FT_VALIDATE_MATH ::
nuclear@0 90 * Validate MATH table.
nuclear@0 91 *
nuclear@0 92 * FT_VALIDATE_OT ::
nuclear@0 93 * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
nuclear@0 94 *
nuclear@0 95 */
nuclear@0 96 #define FT_VALIDATE_BASE 0x0100
nuclear@0 97 #define FT_VALIDATE_GDEF 0x0200
nuclear@0 98 #define FT_VALIDATE_GPOS 0x0400
nuclear@0 99 #define FT_VALIDATE_GSUB 0x0800
nuclear@0 100 #define FT_VALIDATE_JSTF 0x1000
nuclear@0 101 #define FT_VALIDATE_MATH 0x2000
nuclear@0 102
nuclear@0 103 #define FT_VALIDATE_OT FT_VALIDATE_BASE | \
nuclear@0 104 FT_VALIDATE_GDEF | \
nuclear@0 105 FT_VALIDATE_GPOS | \
nuclear@0 106 FT_VALIDATE_GSUB | \
nuclear@0 107 FT_VALIDATE_JSTF | \
nuclear@0 108 FT_VALIDATE_MATH
nuclear@0 109
nuclear@0 110 /* */
nuclear@0 111
nuclear@0 112 /**********************************************************************
nuclear@0 113 *
nuclear@0 114 * @function:
nuclear@0 115 * FT_OpenType_Validate
nuclear@0 116 *
nuclear@0 117 * @description:
nuclear@0 118 * Validate various OpenType tables to assure that all offsets and
nuclear@0 119 * indices are valid. The idea is that a higher-level library which
nuclear@0 120 * actually does the text layout can access those tables without
nuclear@0 121 * error checking (which can be quite time consuming).
nuclear@0 122 *
nuclear@0 123 * @input:
nuclear@0 124 * face ::
nuclear@0 125 * A handle to the input face.
nuclear@0 126 *
nuclear@0 127 * validation_flags ::
nuclear@0 128 * A bit field which specifies the tables to be validated. See
nuclear@0 129 * @FT_VALIDATE_OTXXX for possible values.
nuclear@0 130 *
nuclear@0 131 * @output:
nuclear@0 132 * BASE_table ::
nuclear@0 133 * A pointer to the BASE table.
nuclear@0 134 *
nuclear@0 135 * GDEF_table ::
nuclear@0 136 * A pointer to the GDEF table.
nuclear@0 137 *
nuclear@0 138 * GPOS_table ::
nuclear@0 139 * A pointer to the GPOS table.
nuclear@0 140 *
nuclear@0 141 * GSUB_table ::
nuclear@0 142 * A pointer to the GSUB table.
nuclear@0 143 *
nuclear@0 144 * JSTF_table ::
nuclear@0 145 * A pointer to the JSTF table.
nuclear@0 146 *
nuclear@0 147 * @return:
nuclear@0 148 * FreeType error code. 0~means success.
nuclear@0 149 *
nuclear@0 150 * @note:
nuclear@0 151 * This function only works with OpenType fonts, returning an error
nuclear@0 152 * otherwise.
nuclear@0 153 *
nuclear@0 154 * After use, the application should deallocate the five tables with
nuclear@0 155 * @FT_OpenType_Free. A NULL value indicates that the table either
nuclear@0 156 * doesn't exist in the font, or the application hasn't asked for
nuclear@0 157 * validation.
nuclear@0 158 */
nuclear@0 159 FT_EXPORT( FT_Error )
nuclear@0 160 FT_OpenType_Validate( FT_Face face,
nuclear@0 161 FT_UInt validation_flags,
nuclear@0 162 FT_Bytes *BASE_table,
nuclear@0 163 FT_Bytes *GDEF_table,
nuclear@0 164 FT_Bytes *GPOS_table,
nuclear@0 165 FT_Bytes *GSUB_table,
nuclear@0 166 FT_Bytes *JSTF_table );
nuclear@0 167
nuclear@0 168 /* */
nuclear@0 169
nuclear@0 170 /**********************************************************************
nuclear@0 171 *
nuclear@0 172 * @function:
nuclear@0 173 * FT_OpenType_Free
nuclear@0 174 *
nuclear@0 175 * @description:
nuclear@0 176 * Free the buffer allocated by OpenType validator.
nuclear@0 177 *
nuclear@0 178 * @input:
nuclear@0 179 * face ::
nuclear@0 180 * A handle to the input face.
nuclear@0 181 *
nuclear@0 182 * table ::
nuclear@0 183 * The pointer to the buffer that is allocated by
nuclear@0 184 * @FT_OpenType_Validate.
nuclear@0 185 *
nuclear@0 186 * @note:
nuclear@0 187 * This function must be used to free the buffer allocated by
nuclear@0 188 * @FT_OpenType_Validate only.
nuclear@0 189 */
nuclear@0 190 FT_EXPORT( void )
nuclear@0 191 FT_OpenType_Free( FT_Face face,
nuclear@0 192 FT_Bytes table );
nuclear@0 193
nuclear@0 194
nuclear@0 195 /* */
nuclear@0 196
nuclear@0 197
nuclear@0 198 FT_END_HEADER
nuclear@0 199
nuclear@0 200 #endif /* __FTOTVAL_H__ */
nuclear@0 201
nuclear@0 202
nuclear@0 203 /* END */