misc/libfreetype/src/gxvalid/gxvmort5.c
author nemo
Sun, 11 Sep 2011 10:46:53 -0400
changeset 5856 ed97138dc414
parent 5172 88f2e05288ba
permissions -rw-r--r--
Should prevent a crasher when drowning while firing
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
/*  gxvmort5.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 mort 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 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 "gxvmort.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_gxvmort
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
   * mort subtable type5 (Contextual Glyph Insertion)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
   * has the format of StateTable with insertion-glyph-list,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
   * but without name.  The offset is given by glyphOffset in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
   * entryTable.  There is no table location declaration
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
   * like xxxTable.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
   */
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
  typedef struct  GXV_mort_subtable_type5_StateOptRec_
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
    FT_UShort   classTable;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
    FT_UShort   stateArray;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
    FT_UShort   entryTable;
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
#define GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE  GXV_STATETABLE_HEADER_SIZE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
    FT_UShort*  classTable_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
    FT_UShort*  stateArray_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
    FT_UShort*  entryTable_length_p;
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
  }  GXV_mort_subtable_type5_StateOptRec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
    *GXV_mort_subtable_type5_StateOptRecData;
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
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  gxv_mort_subtable_type5_subtable_setup( FT_UShort      table_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
                                          FT_UShort      classTable,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
                                          FT_UShort      stateArray,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
                                          FT_UShort      entryTable,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
                                          FT_UShort*     classTable_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
                                          FT_UShort*     stateArray_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
                                          FT_UShort*     entryTable_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
                                          GXV_Validator  valid )
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_mort_subtable_type5_StateOptRecData  optdata =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
      (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata;
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
    gxv_StateTable_subtable_setup( table_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
                                   classTable,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
                                   stateArray,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
                                   entryTable,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
                                   classTable_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
                                   stateArray_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
                                   entryTable_length_p,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
                                   valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
    optdata->classTable = classTable;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
    optdata->stateArray = stateArray;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
    optdata->entryTable = entryTable;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
    optdata->classTable_length_p = classTable_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
    optdata->stateArray_length_p = stateArray_length_p;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
    optdata->entryTable_length_p = entryTable_length_p;
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
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
  gxv_mort_subtable_type5_InsertList_validate( FT_UShort      offset,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
                                               FT_UShort      count,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
                                               FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
                                               FT_Bytes       limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
                                               GXV_Validator  valid )
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
     * We don't know the range of insertion-glyph-list.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
     * Set range by whole of state table.
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
    FT_Bytes  p = table + offset;
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
    GXV_mort_subtable_type5_StateOptRecData  optdata =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
      (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata;
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
    if ( optdata->classTable < offset                                   &&
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
         offset < optdata->classTable + *(optdata->classTable_length_p) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
      GXV_TRACE(( " offset runs into ClassTable" ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
    if ( optdata->stateArray < offset                                   &&
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
         offset < optdata->stateArray + *(optdata->stateArray_length_p) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
      GXV_TRACE(( " offset runs into StateArray" ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
    if ( optdata->entryTable < offset                                   &&
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
         offset < optdata->entryTable + *(optdata->entryTable_length_p) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
      GXV_TRACE(( " offset runs into EntryTable" ));
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
    while ( p < table + offset + ( count * 2 ) )
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
      FT_UShort insert_glyphID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
      GXV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
      insert_glyphID = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
      GXV_TRACE(( " 0x%04x", insert_glyphID ));
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
    GXV_TRACE(( "\n" ));
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  gxv_mort_subtable_type5_entry_validate(
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
    FT_Byte                         state,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
    FT_UShort                       flags,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
    GXV_StateTable_GlyphOffsetCPtr  glyphOffset,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
    FT_Bytes                        table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
    FT_Bytes                        limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    GXV_Validator                   valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
    FT_Bool    setMark;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
    FT_Bool    dontAdvance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
    FT_Bool    currentIsKashidaLike;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    FT_Bool    markedIsKashidaLike;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
    FT_Bool    currentInsertBefore;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
    FT_Bool    markedInsertBefore;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
    FT_Byte    currentInsertCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    FT_Byte    markedInsertCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
    FT_UShort  currentInsertList;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
    FT_UShort  markedInsertList;
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
    FT_UNUSED( state );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
    setMark              = FT_BOOL( ( flags >> 15 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
    dontAdvance          = FT_BOOL( ( flags >> 14 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
    currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
    markedIsKashidaLike  = FT_BOOL( ( flags >> 12 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
    currentInsertBefore  = FT_BOOL( ( flags >> 11 ) & 1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
    markedInsertBefore   = FT_BOOL( ( flags >> 10 ) & 1 );
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
    currentInsertCount   = (FT_Byte)( ( flags >> 5 ) & 0x1F   );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
    markedInsertCount    = (FT_Byte)(   flags        & 0x001F );
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
    currentInsertList    = (FT_UShort)( glyphOffset->ul >> 16 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
    markedInsertList     = (FT_UShort)( glyphOffset->ul       );
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
    if ( 0 != currentInsertList && 0 != currentInsertCount )
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
      gxv_mort_subtable_type5_InsertList_validate( currentInsertList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
                                                   currentInsertCount,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
                                                   table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
                                                   limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
                                                   valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
    }
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
    if ( 0 != markedInsertList && 0 != markedInsertCount )
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
      gxv_mort_subtable_type5_InsertList_validate( markedInsertList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
                                                   markedInsertCount,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
                                                   table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
                                                   limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
                                                   valid );
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
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
  gxv_mort_subtable_type5_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
                                    FT_Bytes       limit,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
                                    GXV_Validator  valid )
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
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
    GXV_mort_subtable_type5_StateOptRec      et_rec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
    GXV_mort_subtable_type5_StateOptRecData  et = &et_rec;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
    GXV_NAME_ENTER( "mort chain subtable type5 (Glyph Insertion)" );
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
    GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
    valid->statetable.optdata =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
      et;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
    valid->statetable.optdata_load_func =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
      NULL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
    valid->statetable.subtable_setup_func =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
      gxv_mort_subtable_type5_subtable_setup;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
    valid->statetable.entry_glyphoffset_fmt =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
      GXV_GLYPHOFFSET_ULONG;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
    valid->statetable.entry_validate_func =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
      gxv_mort_subtable_type5_entry_validate;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
    gxv_StateTable_validate( p, limit, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
    GXV_EXIT;
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
/* END */