misc/libfreetype/include/freetype/ftgxval.h
author szczur
Tue, 30 Oct 2012 00:13:22 +0100
branch0.9.18
changeset 7891 77faa4b96771
parent 5172 88f2e05288ba
permissions -rw-r--r--
polish language update (+ closes issue #322)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftgxval.h                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 2004, 2005, 2006 by                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  Masatake YAMATO, Redhat K.K,                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
/* gxvalid is derived from both gxlayout module and otvalid module.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
/* Development of gxlayout is supported by the Information-technology      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
/* Promotion Agency(IPA), Japan.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#ifndef __FTGXVAL_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#define __FTGXVAL_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
#include FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  /*    gx_validation                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
  /*    TrueTypeGX/AAT Validation                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /*    An API to validate TrueTypeGX/AAT tables.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*    This section contains the declaration of functions to validate     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /*    some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  /*    trak, prop, lcar).                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  /* Warning: Use FT_VALIDATE_XXX to validate a table.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  /*          Following definitions are for gxvalid developers.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
#define FT_VALIDATE_feat_INDEX     0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
#define FT_VALIDATE_mort_INDEX     1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
#define FT_VALIDATE_morx_INDEX     2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
#define FT_VALIDATE_bsln_INDEX     3
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
#define FT_VALIDATE_just_INDEX     4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
#define FT_VALIDATE_kern_INDEX     5
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
#define FT_VALIDATE_opbd_INDEX     6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
#define FT_VALIDATE_trak_INDEX     7
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
#define FT_VALIDATE_prop_INDEX     8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
#define FT_VALIDATE_lcar_INDEX     9
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
#define FT_VALIDATE_GX_LAST_INDEX  FT_VALIDATE_lcar_INDEX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
   *   FT_VALIDATE_GX_LENGTH
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
   *   The number of tables checked in this module.  Use it as a parameter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
   *   for the `table-length' argument of function @FT_TrueTypeGX_Validate.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
#define FT_VALIDATE_GX_LENGTH     (FT_VALIDATE_GX_LAST_INDEX + 1)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
  /* Up to 0x1000 is used by otvalid.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
     Ox2xxx is reserved for feature OT extension. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
#define FT_VALIDATE_GX_START 0x4000
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
#define FT_VALIDATE_GX_BITFIELD( tag )                  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  *    FT_VALIDATE_GXXXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  *    A list of bit-field constants used with @FT_TrueTypeGX_Validate to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  *    indicate which TrueTypeGX/AAT Type tables should be validated.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
  * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  *    FT_VALIDATE_feat ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  *      Validate `feat' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
  *    FT_VALIDATE_mort ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
  *      Validate `mort' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  *    FT_VALIDATE_morx ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
  *      Validate `morx' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  *    FT_VALIDATE_bsln ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  *      Validate `bsln' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  *    FT_VALIDATE_just ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  *      Validate `just' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  *    FT_VALIDATE_kern ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  *      Validate `kern' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  *    FT_VALIDATE_opbd ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  *      Validate `opbd' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  *    FT_VALIDATE_trak ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  *      Validate `trak' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  *    FT_VALIDATE_prop ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  *      Validate `prop' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  *    FT_VALIDATE_lcar ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  *      Validate `lcar' table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  *    FT_VALIDATE_GX ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  *      Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  *      opbd, trak, prop and lcar).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
#define FT_VALIDATE_feat  FT_VALIDATE_GX_BITFIELD( feat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
#define FT_VALIDATE_mort  FT_VALIDATE_GX_BITFIELD( mort )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
#define FT_VALIDATE_morx  FT_VALIDATE_GX_BITFIELD( morx )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
#define FT_VALIDATE_bsln  FT_VALIDATE_GX_BITFIELD( bsln )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
#define FT_VALIDATE_just  FT_VALIDATE_GX_BITFIELD( just )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
#define FT_VALIDATE_kern  FT_VALIDATE_GX_BITFIELD( kern )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
#define FT_VALIDATE_opbd  FT_VALIDATE_GX_BITFIELD( opbd )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
#define FT_VALIDATE_trak  FT_VALIDATE_GX_BITFIELD( trak )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
#define FT_VALIDATE_prop  FT_VALIDATE_GX_BITFIELD( prop )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
#define FT_VALIDATE_lcar  FT_VALIDATE_GX_BITFIELD( lcar )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
#define FT_VALIDATE_GX  ( FT_VALIDATE_feat | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
                          FT_VALIDATE_mort | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
                          FT_VALIDATE_morx | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
                          FT_VALIDATE_bsln | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
                          FT_VALIDATE_just | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
                          FT_VALIDATE_kern | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
                          FT_VALIDATE_opbd | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
                          FT_VALIDATE_trak | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
                          FT_VALIDATE_prop | \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
                          FT_VALIDATE_lcar )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
  *    FT_TrueTypeGX_Validate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  *    Validate various TrueTypeGX tables to assure that all offsets and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
  *    indices are valid.  The idea is that a higher-level library which
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  *    actually does the text layout can access those tables without
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  *    error checking (which can be quite time consuming).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
  *    face ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  *       A handle to the input face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
  *    validation_flags ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
  *       A bit field which specifies the tables to be validated.  See
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
  *       @FT_VALIDATE_GXXXX for possible values.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
  *    table_length ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
  *       The size of the `tables' array.  Normally, @FT_VALIDATE_GX_LENGTH
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
  *       should be passed.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
  * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
  *    tables ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
  *       The array where all validated sfnt tables are stored.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
  *       The array itself must be allocated by a client.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
  * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
  *   FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
  *   This function only works with TrueTypeGX fonts, returning an error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
  *   otherwise.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
  *   After use, the application should deallocate the buffers pointed to by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
  *   each `tables' element, by calling @FT_TrueTypeGX_Free.  A NULL value
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
  *   indicates that the table either doesn't exist in the font, the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
  *   application hasn't asked for validation, or the validator doesn't have
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
  *   the ability to validate the sfnt table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
  FT_TrueTypeGX_Validate( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
                          FT_UInt   validation_flags,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
                          FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
                          FT_UInt   table_length );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  *    FT_TrueTypeGX_Free
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  *    Free the buffer allocated by TrueTypeGX validator.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  *    face ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  *       A handle to the input face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
  *    table ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
  *       The pointer to the buffer allocated by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
  *       @FT_TrueTypeGX_Validate.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  *   This function must be used to free the buffer allocated by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
  *   @FT_TrueTypeGX_Validate only.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
  FT_TrueTypeGX_Free( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
                      FT_Bytes  table );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
  *    FT_VALIDATE_CKERNXXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  *    A list of bit-field constants used with @FT_ClassicKern_Validate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
  *    to indicate the classic kern dialect or dialects.  If the selected
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
  *    type doesn't fit, @FT_ClassicKern_Validate regards the table as
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
  *    invalid.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
  * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  *    FT_VALIDATE_MS ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  *      Handle the `kern' table as a classic Microsoft kern table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  *    FT_VALIDATE_APPLE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  *      Handle the `kern' table as a classic Apple kern table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  *    FT_VALIDATE_CKERN ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  *      Handle the `kern' as either classic Apple or Microsoft kern table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
#define FT_VALIDATE_MS     ( FT_VALIDATE_GX_START << 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
#define FT_VALIDATE_APPLE  ( FT_VALIDATE_GX_START << 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
#define FT_VALIDATE_CKERN  ( FT_VALIDATE_MS | FT_VALIDATE_APPLE )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  *    FT_ClassicKern_Validate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  *    Validate classic (16-bit format) kern table to assure that the offsets
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
  *    and indices are valid.  The idea is that a higher-level library which
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
  *    actually does the text layout can access those tables without error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
  *    checking (which can be quite time consuming).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
  *    The `kern' table validator in @FT_TrueTypeGX_Validate deals with both
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
  *    the new 32-bit format and the classic 16-bit format, while
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
  *    FT_ClassicKern_Validate only supports the classic 16-bit format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
  *    face ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  *       A handle to the input face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
  *    validation_flags ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  *       A bit field which specifies the dialect to be validated.  See
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
  *       @FT_VALIDATE_CKERNXXX for possible values.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
  * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
  *    ckern_table ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
  *       A pointer to the kern table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
  * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
  *   FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
  *   After use, the application should deallocate the buffers pointed to by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
  *   `ckern_table', by calling @FT_ClassicKern_Free.  A NULL value
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
  *   indicates that the table doesn't exist in the font.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
  FT_ClassicKern_Validate( FT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
                           FT_UInt    validation_flags,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
                           FT_Bytes  *ckern_table );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
  *    FT_ClassicKern_Free
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
  *    Free the buffer allocated by classic Kern validator.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
  *    face ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
  *       A handle to the input face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
  *    table ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
  *       The pointer to the buffer that is allocated by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
  *       @FT_ClassicKern_Validate.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
  *   This function must be used to free the buffer allocated by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
  *   @FT_ClassicKern_Validate only.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
  FT_ClassicKern_Free( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
                       FT_Bytes  table );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
 /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
#endif /* __FTGXVAL_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
/* END */