misc/libfreetype/src/otvalid/otvgsub.c
author sheepluva
Wed, 02 May 2012 12:24:44 +0200
changeset 6991 1ec44dde5eb9
parent 5172 88f2e05288ba
permissions -rw-r--r--
make search filter field have a useable size on low frontend resolution
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
/*  otvgsub.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 GSUB 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_otvgsub
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
  /*****                  GSUB LOOKUP TYPE 1                           *****/
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
  /* uses valid->glyph_count */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  otv_SingleSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
                            OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
    FT_UInt   SubstFormat;
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
    OTV_NAME_ENTER( "SingleSubst" );
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
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
    SubstFormat = FT_NEXT_USHORT( p );
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_TRACE(( " (format %d)\n", SubstFormat ));
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
    switch ( SubstFormat )
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
    case 1:     /* SingleSubstFormat1 */
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
        FT_Bytes  Coverage;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
        FT_Int    DeltaGlyphID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
        FT_Long   idx;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
        OTV_LIMIT_CHECK( 4 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
        Coverage     = table + FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
        DeltaGlyphID = FT_NEXT_SHORT( p );
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
        otv_Coverage_validate( Coverage, valid, -1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
        idx = otv_Coverage_get_first( Coverage ) + DeltaGlyphID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
        if ( idx < 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
          FT_INVALID_DATA;
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
        idx = otv_Coverage_get_last( Coverage ) + DeltaGlyphID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
        if ( (FT_UInt)idx >= valid->glyph_count )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
          FT_INVALID_DATA;
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
      break;
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
    case 2:     /* SingleSubstFormat2 */
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
        FT_UInt  Coverage, GlyphCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
        OTV_LIMIT_CHECK( 4 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
        Coverage   = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
        GlyphCount = FT_NEXT_USHORT( p );
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
        OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
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
        otv_Coverage_validate( table + Coverage, valid, GlyphCount );
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
        OTV_LIMIT_CHECK( GlyphCount * 2 );
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
        /* Substitute */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
        for ( ; GlyphCount > 0; GlyphCount-- )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
          if ( FT_NEXT_USHORT( p ) >= valid->glyph_count )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
            FT_INVALID_GLYPH_ID;
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
      break;
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
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
    }
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
    OTV_EXIT;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  /*****                  GSUB LOOKUP TYPE 2                           *****/
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
  /*************************************************************************/
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
  /* sets valid->extra1 (glyph count) */
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
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  otv_MultipleSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
                              OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
    FT_UInt   SubstFormat;
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
    OTV_NAME_ENTER( "MultipleSubst" );
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
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
    SubstFormat = FT_NEXT_USHORT( p );
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
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
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
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
    case 1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
      valid->extra1 = valid->glyph_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
      OTV_NEST2( MultipleSubstFormat1, Sequence );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
      break;
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
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  }
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
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
  /*************************************************************************/
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
  /*****                    GSUB LOOKUP TYPE 3                         *****/
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
  /*************************************************************************/
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
  /* sets valid->extra1 (glyph count) */
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
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  otv_AlternateSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
                               OTV_Validator  valid )
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
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
    FT_UInt   SubstFormat;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
    OTV_NAME_ENTER( "AlternateSubst" );
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
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
    SubstFormat = FT_NEXT_USHORT( p );
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
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
    case 1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
      valid->extra1 = valid->glyph_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
      OTV_NEST2( AlternateSubstFormat1, AlternateSet );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
      FT_INVALID_FORMAT;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
    OTV_EXIT;
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
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
  /*************************************************************************/
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
  /*****                    GSUB LOOKUP TYPE 4                         *****/
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
  /*************************************************************************/
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
#define LigatureFunc  otv_Ligature_validate
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
  /* uses valid->glyph_count */
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
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
  otv_Ligature_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
                         OTV_Validator  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
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
    FT_UInt   LigatureGlyph, CompCount;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
    OTV_ENTER;
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
    OTV_LIMIT_CHECK( 4 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
    LigatureGlyph = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
    if ( LigatureGlyph >= valid->glyph_count )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
      FT_INVALID_DATA;
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
    CompCount = FT_NEXT_USHORT( p );
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
    OTV_TRACE(( " (CompCount = %d)\n", CompCount ));
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
    if ( CompCount == 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
      FT_INVALID_DATA;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
    CompCount--;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
    OTV_LIMIT_CHECK( CompCount * 2 );     /* Component */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
    /* no need to check the Component glyph indices */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
  otv_LigatureSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
                              OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
    FT_UInt   SubstFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
    OTV_NAME_ENTER( "LigatureSubst" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
    SubstFormat = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
    case 1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
      OTV_NEST3( LigatureSubstFormat1, LigatureSet, Ligature );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /*****                  GSUB LOOKUP TYPE 5                           *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
  /* sets valid->extra1 (lookup count) */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
  otv_ContextSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
                             OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
    FT_UInt   SubstFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
    OTV_NAME_ENTER( "ContextSubst" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
    SubstFormat = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
    case 1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
      /* no need to check glyph indices/classes used as input for these */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
      /* context rules since even invalid glyph indices/classes return  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
      /* meaningful results                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
      valid->extra1 = valid->lookup_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
      OTV_NEST3( ContextSubstFormat1, SubRuleSet, SubRule );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
    case 2:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
      /* no need to check glyph indices/classes used as input for these */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
      /* context rules since even invalid glyph indices/classes return  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
      /* meaningful results                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
      OTV_NEST3( ContextSubstFormat2, SubClassSet, SubClassRule );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
    case 3:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
      OTV_NEST1( ContextSubstFormat3 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
  /*****                    GSUB LOOKUP TYPE 6                         *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
  /* sets valid->extra1 (lookup count)            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
  otv_ChainContextSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
                                  OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
    FT_UInt   SubstFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
    OTV_NAME_ENTER( "ChainContextSubst" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
    SubstFormat = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
    case 1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
      /* no need to check glyph indices/classes used as input for these */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
      /* context rules since even invalid glyph indices/classes return  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
      /* meaningful results                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
      valid->extra1 = valid->lookup_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
      OTV_NEST3( ChainContextSubstFormat1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
                 ChainSubRuleSet, ChainSubRule );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
    case 2:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
      /* no need to check glyph indices/classes used as input for these */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
      /* context rules since even invalid glyph indices/classes return  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
      /* meaningful results                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
      OTV_NEST3( ChainContextSubstFormat2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
                 ChainSubClassSet, ChainSubClassRule );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
    case 3:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
      OTV_NEST1( ChainContextSubstFormat3 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
      OTV_RUN( table, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
  /*****                    GSUB LOOKUP TYPE 7                         *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
  /* uses valid->type_funcs */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
  otv_ExtensionSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
                               OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
    FT_Bytes  p = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
    FT_UInt   SubstFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
    OTV_NAME_ENTER( "ExtensionSubst" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
    SubstFormat = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
    case 1:     /* ExtensionSubstFormat1 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
      {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
        FT_UInt            ExtensionLookupType;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
        FT_ULong           ExtensionOffset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
        OTV_Validate_Func  validate;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
        OTV_LIMIT_CHECK( 6 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
        ExtensionLookupType = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
        ExtensionOffset     = FT_NEXT_ULONG( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   426
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   427
        if ( ExtensionLookupType == 0 ||
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
             ExtensionLookupType == 7 ||
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
             ExtensionLookupType > 8  )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
          FT_INVALID_DATA;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
        validate = valid->type_funcs[ExtensionLookupType - 1];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
        validate( table + ExtensionOffset, valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
      }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
  /*****                    GSUB LOOKUP TYPE 8                         *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
  /* uses valid->glyph_count */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
  static void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
  otv_ReverseChainSingleSubst_validate( FT_Bytes       table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
                                        OTV_Validator  valid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
    FT_Bytes  p = table, Coverage;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
    FT_UInt   SubstFormat;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
    FT_UInt   BacktrackGlyphCount, LookaheadGlyphCount, GlyphCount;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
    OTV_NAME_ENTER( "ReverseChainSingleSubst" );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
    OTV_LIMIT_CHECK( 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
    SubstFormat = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
    OTV_TRACE(( " (format %d)\n", SubstFormat ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
    switch ( SubstFormat )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
    case 1:     /* ReverseChainSingleSubstFormat1 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
      OTV_LIMIT_CHECK( 4 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
      Coverage            = table + FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
      BacktrackGlyphCount = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
      OTV_TRACE(( " (BacktrackGlyphCount = %d)\n", BacktrackGlyphCount ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
      otv_Coverage_validate( Coverage, valid, -1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
      OTV_LIMIT_CHECK( BacktrackGlyphCount * 2 + 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   483
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   484
      for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
        otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
      LookaheadGlyphCount = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
      OTV_TRACE(( " (LookaheadGlyphCount = %d)\n", LookaheadGlyphCount ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
      OTV_LIMIT_CHECK( LookaheadGlyphCount * 2 + 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
      for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
        otv_Coverage_validate( table + FT_NEXT_USHORT( p ), valid, -1 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
      GlyphCount = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   497
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   498
      OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
      if ( GlyphCount != otv_Coverage_get_count( Coverage ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
        FT_INVALID_DATA;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   502
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   503
      OTV_LIMIT_CHECK( GlyphCount * 2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
      /* Substitute */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
      for ( ; GlyphCount > 0; GlyphCount-- )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
        if ( FT_NEXT_USHORT( p ) >= valid->glyph_count )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
          FT_INVALID_DATA;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
      break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
    default:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
    }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
    OTV_EXIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
  static const OTV_Validate_Func  otv_gsub_validate_funcs[8] =
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
    otv_SingleSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
    otv_MultipleSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
    otv_AlternateSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
    otv_LigatureSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
    otv_ContextSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
    otv_ChainContextSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
    otv_ExtensionSubst_validate,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
    otv_ReverseChainSingleSubst_validate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
  };
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
  /*****                          GSUB TABLE                           *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
  /*****                                                               *****/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
  /* sets valid->type_count  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
  /* sets valid->type_funcs  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
  /* sets valid->glyph_count */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
  FT_LOCAL_DEF( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
  otv_GSUB_validate( FT_Bytes      table,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
                     FT_UInt       glyph_count,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
                     FT_Validator  ftvalid )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
    OTV_ValidatorRec  validrec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
    OTV_Validator     valid = &validrec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
    FT_Bytes          p     = table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   553
    FT_UInt           ScriptList, FeatureList, LookupList;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   554
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
    valid->root = ftvalid;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
    FT_TRACE3(( "validating GSUB table\n" ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
    OTV_INIT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
    OTV_LIMIT_CHECK( 10 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
    if ( FT_NEXT_ULONG( p ) != 0x10000UL )      /* Version */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
      FT_INVALID_FORMAT;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   565
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   566
    ScriptList  = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
    FeatureList = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
    LookupList  = FT_NEXT_USHORT( p );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
    valid->type_count  = 8;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
    valid->type_funcs  = (OTV_Validate_Func*)otv_gsub_validate_funcs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
    valid->glyph_count = glyph_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
    otv_LookupList_validate( table + LookupList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
                             valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
    otv_FeatureList_validate( table + FeatureList, table + LookupList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
                              valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
    otv_ScriptList_validate( table + ScriptList, table + FeatureList,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
                             valid );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
    FT_TRACE4(( "\n" ));
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
  }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
/* END */