misc/libfreetype/src/otvalid/otvgdef.c
author hasufell
Sun, 04 Nov 2012 15:43:32 +0100
branch0.9.18
changeset 7940 d5e49cf042d9
parent 5172 88f2e05288ba
permissions -rw-r--r--
fix parallel compilation
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
/*  otvgdef.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
/*    OpenType GDEF table validation (body).                               */
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, 2007 by                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  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
    11
/*  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
    12
/*  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
    13
/*  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
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
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
#include "otvalid.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#include "otvcommn.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /*************************************************************************/
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
  /* 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
    26
  /* 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
    27
  /* messages during execution.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#undef  FT_COMPONENT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
#define FT_COMPONENT  trace_otvgdef
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  /*****                      UTILITY FUNCTIONS                        *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  /*************************************************************************/
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
#define AttachListFunc    otv_O_x_Ox
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
#define LigCaretListFunc  otv_O_x_Ox
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
  /* sets valid->extra1 (0)           */
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
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  otv_O_x_Ox( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
              OTV_Validator  valid )
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
    FT_Bytes           p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
    FT_Bytes           Coverage;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
    FT_UInt            GlyphCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
    OTV_Validate_Func  func;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
    OTV_ENTER;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
    OTV_LIMIT_CHECK( 4 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
    Coverage   = table + FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
    GlyphCount = FT_NEXT_USHORT( p );
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
    OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
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
    otv_Coverage_validate( Coverage, valid, GlyphCount );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
    if ( GlyphCount != otv_Coverage_get_count( Coverage ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
      FT_INVALID_DATA;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
    OTV_LIMIT_CHECK( GlyphCount * 2 );
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
    valid->nesting_level++;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
    func          = valid->func[valid->nesting_level];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
    valid->extra1 = 0;
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
    for ( ; GlyphCount > 0; GlyphCount-- )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
      func( table + FT_NEXT_USHORT( p ), valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
    valid->nesting_level--;
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
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
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
  /*****                       LIGATURE CARETS                         *****/
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
  /*************************************************************************/
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
#define CaretValueFunc  otv_CaretValue_validate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  otv_CaretValue_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
                           OTV_Validator  valid )
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
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
    FT_UInt   CaretValueFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
    OTV_ENTER;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
    OTV_LIMIT_CHECK( 4 );
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
    CaretValueFormat = FT_NEXT_USHORT( p );
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
    OTV_TRACE(( " (format = %d)\n", CaretValueFormat ));
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
    switch ( CaretValueFormat )
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
    case 1:     /* CaretValueFormat1 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
      /* skip Coordinate, no test */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
    case 2:     /* CaretValueFormat2 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
      /* skip CaretValuePoint, no test */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
    case 3:     /* CaretValueFormat3 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
      p += 2;   /* skip Coordinate */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
      OTV_LIMIT_CHECK( 2 );
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
      /* DeviceTable */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
      otv_Device_validate( table + FT_NEXT_USHORT( p ), valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
      break;
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
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
      FT_INVALID_FORMAT;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
    OTV_EXIT;
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
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
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*****                         GDEF TABLE                            *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*****                                                               *****/
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
  /*************************************************************************/
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
  /* sets valid->glyph_count */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  otv_GDEF_validate( FT_Bytes      table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
                     FT_Bytes      gsub,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
                     FT_Bytes      gpos,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
                     FT_UInt       glyph_count,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
                     FT_Validator  ftvalid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
    OTV_ValidatorRec  validrec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    OTV_Validator     valid = &validrec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
    FT_Bytes          p     = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
    FT_UInt           table_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
    FT_Bool           need_MarkAttachClassDef;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
    OTV_OPTIONAL_TABLE( GlyphClassDef );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
    OTV_OPTIONAL_TABLE( AttachListOffset );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
    OTV_OPTIONAL_TABLE( LigCaretListOffset );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
    OTV_OPTIONAL_TABLE( MarkAttachClassDef );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
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
    valid->root = ftvalid;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
    FT_TRACE3(( "validating GDEF table\n" ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
    OTV_INIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
    OTV_LIMIT_CHECK( 12 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
    if ( FT_NEXT_ULONG( p ) != 0x10000UL )          /* Version */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
      FT_INVALID_FORMAT;
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
    /* MarkAttachClassDef has been added to the OpenType */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
    /* specification without increasing GDEF's version,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
    /* so we use this ugly hack to find out whether the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
    /* table is needed actually.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
    need_MarkAttachClassDef = FT_BOOL(
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
      otv_GSUBGPOS_have_MarkAttachmentType_flag( gsub ) ||
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
      otv_GSUBGPOS_have_MarkAttachmentType_flag( gpos ) );
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
    if ( need_MarkAttachClassDef )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
      table_size = 12;              /* OpenType >= 1.2 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
    else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
      table_size = 10;              /* OpenType < 1.2  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
    valid->glyph_count = glyph_count;
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
    OTV_OPTIONAL_OFFSET( GlyphClassDef );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
    OTV_SIZE_CHECK( GlyphClassDef );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
    if ( GlyphClassDef )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
      otv_ClassDef_validate( table + GlyphClassDef, valid );
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
    OTV_OPTIONAL_OFFSET( AttachListOffset );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
    OTV_SIZE_CHECK( AttachListOffset );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
    if ( AttachListOffset )
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
      OTV_NEST2( AttachList, AttachPoint );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
      OTV_RUN( table + AttachListOffset, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
    }
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
    OTV_OPTIONAL_OFFSET( LigCaretListOffset );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
    OTV_SIZE_CHECK( LigCaretListOffset );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
    if ( LigCaretListOffset )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
      OTV_NEST3( LigCaretList, LigGlyph, CaretValue );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
      OTV_RUN( table + LigCaretListOffset, valid );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
    if ( need_MarkAttachClassDef )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
      OTV_OPTIONAL_OFFSET( MarkAttachClassDef );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
      OTV_SIZE_CHECK( MarkAttachClassDef );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
      if ( MarkAttachClassDef )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
        otv_ClassDef_validate( table + MarkAttachClassDef, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
    }
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
    FT_TRACE4(( "\n" ));
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
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
/* END */