misc/libfreetype/src/truetype/ttinterp.h
author nemo
Thu, 04 Apr 2013 08:10:59 -0400
changeset 8848 e9ebd63f8a03
parent 5172 88f2e05288ba
permissions -rw-r--r--
So. Some themes have objects that seem to be large natural extensions of the landscape. Masks allow maintaining that. Lemme know if it doesn't look good. If it doesn't, can still use for ice/bounce/indestructible. Indestructible bunker object for example.
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
/*  ttinterp.h                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    TrueType bytecode interpreter (specification).                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 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
#ifndef __TTINTERP_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __TTINTERP_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
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include "ttobjs.h"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
#define EXEC_OP_   TT_ExecContext  exc,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
#define EXEC_OP    TT_ExecContext  exc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
#define EXEC_ARG_  exc,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
#define EXEC_ARG   exc
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
#else                                       /* static implementation */
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
#define EXEC_OP_   /* void */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
#define EXEC_OP    /* void */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
#define EXEC_ARG_  /* void */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
#define EXEC_ARG   /* void */
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
#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /* Rounding mode constants.                                              */
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
#define TT_Round_Off             5
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
#define TT_Round_To_Half_Grid    0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
#define TT_Round_To_Grid         1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
#define TT_Round_To_Double_Grid  2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
#define TT_Round_Up_To_Grid      4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
#define TT_Round_Down_To_Grid    3
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
#define TT_Round_Super           6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
#define TT_Round_Super_45        7
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
  /*************************************************************************/
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
  /* Function types used by the interpreter, depending on various modes    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /* (e.g. the rounding mode, whether to render a vertical or horizontal   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /* line etc).                                                            */
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  /* Rounding function */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  typedef FT_F26Dot6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  (*TT_Round_Func)( EXEC_OP_ FT_F26Dot6  distance,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
                             FT_F26Dot6  compensation );
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
  /* Point displacement along the freedom vector routine */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  (*TT_Move_Func)( EXEC_OP_ TT_GlyphZone  zone,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
                            FT_UShort     point,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
                            FT_F26Dot6    distance );
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
  /* Distance projection along one of the projection vectors */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  typedef FT_F26Dot6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
  (*TT_Project_Func)( EXEC_OP_ FT_Pos   dx,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
                               FT_Pos   dy );
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
  /* reading a cvt value.  Take care of non-square pixels if necessary */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  typedef FT_F26Dot6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  (*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong  idx );
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
  /* setting or moving a cvt value.  Take care of non-square pixels  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  /* if necessary                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  (*TT_Set_CVT_Func)( EXEC_OP_ FT_ULong    idx,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
                               FT_F26Dot6  value );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  /* This structure defines a call record, used to manage function calls.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
  typedef struct  TT_CallRec_
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
    FT_Int   Caller_Range;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
    FT_Long  Caller_IP;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
    FT_Long  Cur_Count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
    FT_Long  Cur_Restart;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  } TT_CallRec, *TT_CallStack;
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
  /*************************************************************************/
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
  /* The main structure for the interpreter which collects all necessary   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  /* variables and states.                                                 */
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
  typedef struct  TT_ExecContextRec_
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
    TT_Face            face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
    TT_Size            size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
    FT_Memory          memory;
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
    /* instructions state */
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
    FT_Error           error;      /* last execution error */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
    FT_Long            top;        /* top of exec. stack   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
    FT_UInt            stackSize;  /* size of exec. stack  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
    FT_Long*           stack;      /* current exec. stack  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
    FT_Long            args;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
    FT_UInt            new_top;    /* new top after exec.  */
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
    TT_GlyphZoneRec    zp0,        /* zone records */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
                       zp1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
                       zp2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
                       pts,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
                       twilight;
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
    FT_Size_Metrics    metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
    TT_Size_Metrics    tt_metrics; /* size metrics */
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
    TT_GraphicsState   GS;         /* current graphics state */
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
    FT_Int             curRange;  /* current code range number   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
    FT_Byte*           code;      /* current code range          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
    FT_Long            IP;        /* current instruction pointer */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
    FT_Long            codeSize;  /* size of current range       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
    FT_Byte            opcode;    /* current opcode              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
    FT_Int             length;    /* length of current opcode    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
    FT_Bool            step_ins;  /* true if the interpreter must */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
                                  /* increment IP after ins. exec */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
    FT_ULong           cvtSize;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
    FT_Long*           cvt;
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
    FT_UInt            glyphSize; /* glyph instructions buffer size */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
    FT_Byte*           glyphIns;  /* glyph instructions buffer */
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
    FT_UInt            numFDefs;  /* number of function defs         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
    FT_UInt            maxFDefs;  /* maximum number of function defs */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
    TT_DefArray        FDefs;     /* table of FDefs entries          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
    FT_UInt            numIDefs;  /* number of instruction defs */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
    FT_UInt            maxIDefs;  /* maximum number of ins defs */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
    TT_DefArray        IDefs;     /* table of IDefs entries     */
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_UInt            maxFunc;   /* maximum function index     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
    FT_UInt            maxIns;    /* maximum instruction index  */
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
    FT_Int             callTop,    /* top of call stack during execution */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
                       callSize;   /* size of call stack */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
    TT_CallStack       callStack;  /* call stack */
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
    FT_UShort          maxPoints;    /* capacity of this context's `pts' */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
    FT_Short           maxContours;  /* record, expressed in points and  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
                                     /* contours.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
    TT_CodeRangeTable  codeRangeTable;  /* table of valid code ranges */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
                                        /* useful for the debugger   */
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
    FT_UShort          storeSize;  /* size of current storage */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
    FT_Long*           storage;    /* storage area            */
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
    FT_F26Dot6         period;     /* values used for the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
    FT_F26Dot6         phase;      /* `SuperRounding'     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
    FT_F26Dot6         threshold;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
#if 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
    /* this seems to be unused */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
    FT_Int             cur_ppem;   /* ppem along the current proj vector */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
#endif
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
    FT_Bool            instruction_trap; /* If `True', the interpreter will */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
                                         /* exit after each instruction     */
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
    TT_GraphicsState   default_GS;       /* graphics state resulting from   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
                                         /* the prep program                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
    FT_Bool            is_composite;     /* true if the glyph is composite  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
    FT_Bool            pedantic_hinting; /* true if pedantic interpretation */
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
    /* latest interpreter additions */
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
    FT_Long            F_dot_P;    /* dot product of freedom and projection */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
                                   /* vectors                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
    TT_Round_Func      func_round; /* current rounding function             */
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
    TT_Project_Func    func_project,   /* current projection function */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
                       func_dualproj,  /* current dual proj. function */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
                       func_freeProj;  /* current freedom proj. func  */
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
    TT_Move_Func       func_move;      /* current point move function */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
    TT_Move_Func       func_move_orig; /* move original position function */
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
    TT_Get_CVT_Func    func_read_cvt;  /* read a cvt entry              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
    TT_Set_CVT_Func    func_write_cvt; /* write a cvt entry (in pixels) */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
    TT_Set_CVT_Func    func_move_cvt;  /* incr a cvt entry (in pixels)  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
    FT_Bool            grayscale;      /* are we hinting for grayscale? */
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
  } TT_ExecContextRec;
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
  extern const TT_GraphicsState  tt_default_graphics_state;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  TT_Goto_CodeRange( TT_ExecContext  exec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
                     FT_Int          range,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
                     FT_Long         IP );
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
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  TT_Set_CodeRange( TT_ExecContext  exec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
                    FT_Int          range,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
                    void*           base,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
                    FT_Long         length );
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
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
  TT_Clear_CodeRange( TT_ExecContext  exec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
                      FT_Int          range );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  Update_Max( FT_Memory  memory,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
              FT_ULong*  size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
              FT_Long    multiplier,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
              void*      _pbuff,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
              FT_ULong   new_max );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
  /*    TT_New_Context                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
  /*    Queries the face context for a given font.  Note that there is     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  /*    now a _single_ execution context in the TrueType driver which is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  /*    shared among faces.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
  /*    face :: A handle to the source face object.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
  /*    A handle to the execution context.  Initialized for `face'.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
  /*    Only the glyph loader and debugger should call this function.      */
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
  FT_EXPORT( TT_ExecContext )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  TT_New_Context( TT_Driver  driver );
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
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
  TT_Done_Context( TT_ExecContext  exec );
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
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
  TT_Load_Context( TT_ExecContext  exec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
                   TT_Face         face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
                   TT_Size         size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  TT_Save_Context( TT_ExecContext  exec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
                   TT_Size         ins );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
  FT_LOCAL( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  TT_Run_Context( TT_ExecContext  exec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
                  FT_Bool         debug );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
  /*    TT_RunIns                                                          */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
  /*    Executes one or more instruction in the execution context.  This   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  /*    is the main function of the TrueType opcode interpreter.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  /*    exec :: A handle to the target execution context.                  */
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
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  /*    FreeType error code.  0 means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
  /*    Only the object manager and debugger should call this function.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
  /*    This function is publicly exported because it is directly          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
  /*    invoked by the TrueType debugger.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
  TT_RunIns( TT_ExecContext  exec );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
#endif /* __TTINTERP_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
/* END */