misc/libfreetype/src/gxvalid/gxvmorx5.c
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
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
/*  gxvmorx5.c                                                             */
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
/*    TrueTypeGX/AAT morx table validation                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*    body for type5 (Contextual Glyph Insertion) subtable.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat 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
#include "gxvmorx.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /* messages during execution.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
#undef  FT_COMPONENT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
#define FT_COMPONENT  trace_gxvmorx
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
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
   * `morx' subtable type5 (Contextual Glyph Insertion)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
   * has format of a StateTable with insertion-glyph-list
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
   * without name.  However, the 32bit offset from the head
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
   * of subtable to the i-g-l is given after `entryTable',
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
   * without variable name specification (the existence of
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
   * this offset to the table is different from mort type5).
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  typedef struct  GXV_morx_subtable_type5_StateOptRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
    FT_ULong  insertionGlyphList;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
    FT_ULong  insertionGlyphList_length;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  }  GXV_morx_subtable_type5_StateOptRec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
    *GXV_morx_subtable_type5_StateOptRecData;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
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
#define GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
          ( GXV_STATETABLE_HEADER_SIZE + 4 )
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
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  gxv_morx_subtable_type5_insertionGlyphList_load( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
                                                   FT_Bytes       limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
                                                   GXV_Validator  valid )
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
    FT_Bytes  p = table;
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
    GXV_morx_subtable_type5_StateOptRecData  optdata =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
      (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
    GXV_LIMIT_CHECK( 4 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
    optdata->insertionGlyphList = FT_NEXT_ULONG( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
  gxv_morx_subtable_type5_subtable_setup( FT_ULong       table_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
                                          FT_ULong       classTable,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
                                          FT_ULong       stateArray,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
                                          FT_ULong       entryTable,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
                                          FT_ULong*      classTable_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
                                          FT_ULong*      stateArray_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
                                          FT_ULong*      entryTable_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
                                          GXV_Validator  valid )
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
    FT_ULong   o[4];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
    FT_ULong*  l[4];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
    FT_ULong   buff[5];
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
    GXV_morx_subtable_type5_StateOptRecData  optdata =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
      (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
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
    o[0] = classTable;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
    o[1] = stateArray;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
    o[2] = entryTable;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
    o[3] = optdata->insertionGlyphList;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
    l[0] = classTable_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
    l[1] = stateArray_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
    l[2] = entryTable_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
    l[3] = &(optdata->insertionGlyphList_length);
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
    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  }
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  gxv_morx_subtable_type5_InsertList_validate( FT_UShort      table_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
                                               FT_UShort      count,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
                                               FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
                                               FT_Bytes       limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
                                               GXV_Validator  valid )
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_Bytes p = table + table_index * 2;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
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
    while ( p < table + count * 2 + table_index * 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
      FT_UShort  insert_glyphID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
      GXV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
      insert_glyphID = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
      GXV_TRACE(( " 0x%04x", insert_glyphID ));
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
    GXV_TRACE(( "\n" ));
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  gxv_morx_subtable_type5_entry_validate(
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
    FT_UShort                       state,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
    FT_UShort                       flags,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
    GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
    FT_Bytes                        table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
    FT_Bytes                        limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
    GXV_Validator                   valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
    FT_Bool    setMark;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    FT_Bool    dontAdvance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
    FT_Bool    currentIsKashidaLike;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
    FT_Bool    markedIsKashidaLike;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
    FT_Bool    currentInsertBefore;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
    FT_Bool    markedInsertBefore;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    FT_Byte    currentInsertCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
    FT_Byte    markedInsertCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
    FT_Byte    currentInsertList;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
    FT_UShort  markedInsertList;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
    FT_UNUSED( state );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
    setMark              = FT_BOOL( ( flags >> 15 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
    dontAdvance          = FT_BOOL( ( flags >> 14 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
    currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
    markedIsKashidaLike  = FT_BOOL( ( flags >> 12 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
    currentInsertBefore  = FT_BOOL( ( flags >> 11 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
    markedInsertBefore   = FT_BOOL( ( flags >> 10 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
    currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F   );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
    markedInsertCount  = (FT_Byte)(   flags        & 0x001F );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
    currentInsertList = (FT_Byte)  ( glyphOffset_p->ul >> 16 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
    markedInsertList  = (FT_UShort)( glyphOffset_p->ul       );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
    if ( currentInsertList && 0 != currentInsertCount )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
      gxv_morx_subtable_type5_InsertList_validate( currentInsertList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
                                                   currentInsertCount,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
                                                   table, limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
                                                   valid );
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
    if ( markedInsertList && 0 != markedInsertCount )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
      gxv_morx_subtable_type5_InsertList_validate( markedInsertList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
                                                   markedInsertCount,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
                                                   table, limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
                                                   valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
  gxv_morx_subtable_type5_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
                                    FT_Bytes       limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
                                    GXV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
    GXV_morx_subtable_type5_StateOptRec      et_rec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
    GXV_morx_subtable_type5_StateOptRecData  et = &et_rec;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
    GXV_NAME_ENTER( "morx chain subtable type5 (Glyph Insertion)" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
    GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
    valid->xstatetable.optdata =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
      et;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
    valid->xstatetable.optdata_load_func =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
      gxv_morx_subtable_type5_insertionGlyphList_load;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
    valid->xstatetable.subtable_setup_func =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
      gxv_morx_subtable_type5_subtable_setup;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
    valid->xstatetable.entry_glyphoffset_fmt =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
      GXV_GLYPHOFFSET_ULONG;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
    valid->xstatetable.entry_validate_func =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
      gxv_morx_subtable_type5_entry_validate;
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
    gxv_XStateTable_validate( p, limit, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
    GXV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
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
/* END */