misc/libfreetype/include/freetype/internal/tttypes.h
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  tttypes.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
/*    Basic SFNT/TrueType type definitions and interface (specification    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*    only).                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#ifndef __TTTYPES_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
#define __TTTYPES_H__
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
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
#include FT_TRUETYPE_TABLES_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#include FT_INTERNAL_OBJECTS_H
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
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#include FT_MULTIPLE_MASTERS_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
#endif
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
FT_BEGIN_HEADER
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
  /*************************************************************************/
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
  /***             REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/
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
  /***                                                                   ***/
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
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
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /*    TTC_HeaderRec                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /*    TrueType collection header.  This table contains the offsets of    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*    the font headers of each distinct TrueType face in the file.       */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  /*    tag     :: Must be `ttc ' to indicate a TrueType collection.       */
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
  /*    version :: The version number.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /*    count   :: The number of faces in the collection.  The             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /*               specification says this should be an unsigned long, but */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  /*               we use a signed long since we need the value -1 for     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  /*               specific purposes.                                      */
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
  /*    offsets :: The offsets of the font headers, one per face.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  typedef struct  TTC_HeaderRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
    FT_ULong   tag;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
    FT_Fixed   version;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
    FT_Long    count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
    FT_ULong*  offsets;
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
  } TTC_HeaderRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  /*    SFNT_HeaderRec                                                     */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  /*    SFNT file format header.                                           */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  /*    format_tag     :: The font format tag.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /*    num_tables     :: The number of tables in file.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  /*    search_range   :: Must be `16 * (max power of 2 <= num_tables)'.   */
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
  /*    entry_selector :: Must be log2 of `search_range / 16'.             */
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
  /*    range_shift    :: Must be `num_tables * 16 - search_range'.        */
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  SFNT_HeaderRec_
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_ULong   format_tag;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
    FT_UShort  num_tables;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
    FT_UShort  search_range;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
    FT_UShort  entry_selector;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
    FT_UShort  range_shift;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
    FT_ULong   offset;  /* not in file */
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
  } SFNT_HeaderRec, *SFNT_Header;
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
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /*    TT_TableRec                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
  /*    This structure describes a given table of a TrueType font.         */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  /*    Tag      :: A four-bytes tag describing the table.                 */
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
  /*    CheckSum :: The table checksum.  This value can be ignored.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*    Offset   :: The offset of the table from the start of the TrueType */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /*                font in its resource.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /*    Length   :: The table length (in bytes).                           */
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
  typedef struct  TT_TableRec_
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
    FT_ULong  Tag;        /*        table type */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
    FT_ULong  CheckSum;   /*    table checksum */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
    FT_ULong  Offset;     /* table file offset */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
    FT_ULong  Length;     /*      table length */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  } TT_TableRec, *TT_Table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*    TT_LongMetricsRec                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*    A structure modeling the long metrics of the `hmtx' and `vmtx'     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*    TrueType tables.  The values are expressed in font units.          */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  /*    advance :: The advance width or height for the glyph.              */
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
  /*    bearing :: The left-side or top-side bearing for the glyph.        */
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
  typedef struct  TT_LongMetricsRec_
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_UShort  advance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
    FT_Short   bearing;
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
  } TT_LongMetricsRec, *TT_LongMetrics;
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
  /*************************************************************************/
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
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  /*    TT_ShortMetrics                                                    */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
  /*    A simple type to model the short metrics of the `hmtx' and `vmtx'  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
  /*    tables.                                                            */
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
  typedef FT_Short  TT_ShortMetrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  /*    TT_NameEntryRec                                                    */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
  /*    A structure modeling TrueType name records.  Name records are used */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  /*    to store important strings like family name, style name,           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  /*    copyright, etc. in _localized_ versions (i.e., language, encoding, */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
  /*    etc).                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
  /*    platformID   :: The ID of the name's encoding platform.            */
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
  /*    encodingID   :: The platform-specific ID for the name's encoding.  */
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
  /*    languageID   :: The platform-specific ID for the name's language.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
  /*    nameID       :: The ID specifying what kind of name this is.       */
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
  /*    stringLength :: The length of the string in bytes.                 */
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
  /*    stringOffset :: The offset to the string in the `name' table.      */
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
  /*    string       :: A pointer to the string's bytes.  Note that these  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
  /*                    are usually UTF-16 encoded characters.             */
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
  typedef struct  TT_NameEntryRec_
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_UShort  platformID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
    FT_UShort  encodingID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
    FT_UShort  languageID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
    FT_UShort  nameID;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
    FT_UShort  stringLength;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
    FT_ULong   stringOffset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
    /* this last field is not defined in the spec */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
    /* but used by the FreeType engine            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
    FT_Byte*   string;
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
  } TT_NameEntryRec, *TT_NameEntry;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  /*    TT_NameTableRec                                                    */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  /*    A structure modeling the TrueType name table.                      */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  /*    format         :: The format of the name table.                    */
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
  /*    numNameRecords :: The number of names in table.                    */
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
  /*    storageOffset  :: The offset of the name table in the `name'       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  /*                      TrueType table.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
  /*    names          :: An array of name records.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  /*    stream         :: the file's input stream.                         */
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
  typedef struct  TT_NameTableRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
    FT_UShort         format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
    FT_UInt           numNameRecords;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
    FT_UInt           storageOffset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
    TT_NameEntryRec*  names;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
    FT_Stream         stream;
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
  } TT_NameTableRec, *TT_NameTable;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
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
  /***                                                                   ***/
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
  /***             OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/
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
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  /*************************************************************************/
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  /*    TT_GaspRangeRec                                                    */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
  /*    A tiny structure used to model a gasp range according to the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /*    TrueType specification.                                            */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /*    maxPPEM  :: The maximum ppem value to which `gaspFlag' applies.    */
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
  /*    gaspFlag :: A flag describing the grid-fitting and anti-aliasing   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /*                modes to be used.                                      */
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
  typedef struct  TT_GaspRangeRec_
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
    FT_UShort  maxPPEM;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
    FT_UShort  gaspFlag;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
  } TT_GaspRangeRec, *TT_GaspRange;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
#define TT_GASP_GRIDFIT  0x01
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
#define TT_GASP_DOGRAY   0x02
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
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
  /*    TT_GaspRec                                                         */
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
  /*    A structure modeling the TrueType `gasp' table used to specify     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  /*    grid-fitting and anti-aliasing behaviour.                          */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  /*    version    :: The version number.                                  */
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
  /*    numRanges  :: The number of gasp ranges in table.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
  /*    gaspRanges :: An array of gasp ranges.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
  typedef struct  TT_Gasp_
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
    FT_UShort     version;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
    FT_UShort     numRanges;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
    TT_GaspRange  gaspRanges;
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
  } TT_GaspRec;
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
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
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
  /*************************************************************************/
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
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
  /*    TT_HdmxEntryRec                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
  /*    A small structure used to model the pre-computed widths of a given */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
  /*    size.  They are found in the `hdmx' table.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
  /*    ppem      :: The pixels per EM value at which these metrics apply. */
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
  /*    max_width :: The maximum advance width for this metric.            */
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
  /*    widths    :: An array of widths.  Note: These are 8-bit bytes.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
  typedef struct  TT_HdmxEntryRec_
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
    FT_Byte   ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
    FT_Byte   max_width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
    FT_Byte*  widths;
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
  } TT_HdmxEntryRec, *TT_HdmxEntry;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
  /*    TT_HdmxRec                                                         */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
  /*    A structure used to model the `hdmx' table, which contains         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
  /*    pre-computed widths for a set of given sizes/dimensions.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
  /*    version     :: The version number.                                 */
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
  /*    num_records :: The number of hdmx records.                         */
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
  /*    records     :: An array of hdmx records.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
  typedef struct  TT_HdmxRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
    FT_UShort     version;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
    FT_Short      num_records;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
    TT_HdmxEntry  records;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
  } TT_HdmxRec, *TT_Hdmx;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
  /*    TT_Kern0_PairRec                                                   */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
  /*    A structure used to model a kerning pair for the kerning table     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
  /*    format 0.  The engine now loads this table if it finds one in the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
  /*    font file.                                                         */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
  /*    left  :: The index of the left glyph in pair.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
  /*    right :: The index of the right glyph in pair.                     */
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
  /*    value :: The kerning distance.  A positive value spaces the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
  /*             glyphs, a negative one makes them closer.                 */
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
  typedef struct  TT_Kern0_PairRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
    FT_UShort  left;   /* index of left  glyph in pair */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
    FT_UShort  right;  /* index of right glyph in pair */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
    FT_FWord   value;  /* kerning value                */
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
  } TT_Kern0_PairRec, *TT_Kern0_Pair;
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
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
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
  /*************************************************************************/
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
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
  /***                    EMBEDDED BITMAPS SUPPORT                       ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
  /***                                                                   ***/
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
  /*************************************************************************/
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
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
  /*    TT_SBit_MetricsRec                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
  /*    A structure used to hold the big metrics of a given glyph bitmap   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
  /*    in a TrueType or OpenType font.  These are usually found in the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
  /*    `EBDT' (Microsoft) or `bloc' (Apple) table.                        */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
  /*    height       :: The glyph height in pixels.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
  /*    width        :: The glyph width in pixels.                         */
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
  /*    horiBearingX :: The horizontal left bearing.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
  /*    horiBearingY :: The horizontal top bearing.                        */
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
  /*    horiAdvance  :: The horizontal advance.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
  /*    vertBearingX :: The vertical left bearing.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
  /*    vertBearingY :: The vertical top bearing.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
  /*    vertAdvance  :: The vertical advance.                              */
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
  typedef struct  TT_SBit_MetricsRec_
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
    FT_Byte  height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
    FT_Byte  width;
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
    FT_Char  horiBearingX;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
    FT_Char  horiBearingY;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
    FT_Byte  horiAdvance;
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
    FT_Char  vertBearingX;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
    FT_Char  vertBearingY;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
    FT_Byte  vertAdvance;
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
  } TT_SBit_MetricsRec, *TT_SBit_Metrics;
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
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
  /*    TT_SBit_SmallMetricsRec                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
  /*    A structure used to hold the small metrics of a given glyph bitmap */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
  /*    in a TrueType or OpenType font.  These are usually found in the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
  /*    `EBDT' (Microsoft) or the `bdat' (Apple) table.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
  /*    height   :: The glyph height in pixels.                            */
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
  /*    width    :: The glyph width in pixels.                             */
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
  /*    bearingX :: The left-side bearing.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
  /*    bearingY :: The top-side bearing.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
  /*    advance  :: The advance width or height.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
  typedef struct  TT_SBit_Small_Metrics_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
    FT_Byte  height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
    FT_Byte  width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
    FT_Char  bearingX;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
    FT_Char  bearingY;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
    FT_Byte  advance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
  } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
  /*    TT_SBit_LineMetricsRec                                             */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
  /*    A structure used to describe the text line metrics of a given      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
  /*    bitmap strike, for either a horizontal or vertical layout.         */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
  /*    ascender                :: The ascender in pixels.                 */
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
  /*    descender               :: The descender in pixels.                */
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
  /*    max_width               :: The maximum glyph width in pixels.      */
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
  /*    caret_slope_enumerator  :: Rise of the caret slope, typically set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
  /*                               to 1 for non-italic fonts.              */
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
  /*    caret_slope_denominator :: Rise of the caret slope, typically set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
  /*                               to 0 for non-italic fonts.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
  /*    caret_offset            :: Offset in pixels to move the caret for  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
  /*                               proper positioning.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
  /*    min_origin_SB           :: Minimum of horiBearingX (resp.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
  /*                               vertBearingY).                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
  /*    min_advance_SB          :: Minimum of                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
  /*                                 horizontal advance -                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
  /*                                   ( horiBearingX + width )            */
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
  /*                               resp.                                   */
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
  /*                                 vertical advance -                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
  /*                                   ( vertBearingY + height )           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
  /*    max_before_BL           :: Maximum of horiBearingY (resp.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
  /*                               vertBearingY).                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
  /*    min_after_BL            :: Minimum of                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
  /*                                 horiBearingY - height                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
  /*                               resp.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
  /*                                 vertBearingX - width                  */
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
  /*    pads                    :: Unused (to make the size of the record  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
  /*                               a multiple of 32 bits.                  */
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
  typedef struct  TT_SBit_LineMetricsRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
    FT_Char  ascender;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
    FT_Char  descender;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
    FT_Byte  max_width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
    FT_Char  caret_slope_numerator;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
    FT_Char  caret_slope_denominator;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
    FT_Char  caret_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
    FT_Char  min_origin_SB;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
    FT_Char  min_advance_SB;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
    FT_Char  max_before_BL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
    FT_Char  min_after_BL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
    FT_Char  pads[2];
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
  } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   553
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   554
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
  /*    TT_SBit_RangeRec                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
  /*    A TrueType/OpenType subIndexTable as defined in the `EBLC'         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
  /*    (Microsoft) or `bloc' (Apple) tables.                              */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
  /*    first_glyph   :: The first glyph index in the range.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
  /*    last_glyph    :: The last glyph index in the range.                */
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
  /*    index_format  :: The format of index table.  Valid values are 1    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
  /*                     to 5.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
  /*    image_format  :: The format of `EBDT' image data.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
  /*    image_offset  :: The offset to image data in `EBDT'.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
  /*    image_size    :: For index formats 2 and 5.  This is the size in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
  /*                     bytes of each glyph bitmap.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
  /*    big_metrics   :: For index formats 2 and 5.  This is the big       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
  /*                     metrics for each glyph bitmap.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
  /*    num_glyphs    :: For index formats 4 and 5.  This is the number of */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
  /*                     glyphs in the code array.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
  /*    glyph_offsets :: For index formats 1 and 3.                        */
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
  /*    glyph_codes   :: For index formats 4 and 5.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
  /*    table_offset  :: The offset of the index table in the `EBLC'       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
  /*                     table.  Only used during strike loading.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   588
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   589
  typedef struct  TT_SBit_RangeRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   590
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
    FT_UShort           first_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
    FT_UShort           last_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   594
    FT_UShort           index_format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   595
    FT_UShort           image_format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   596
    FT_ULong            image_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   597
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   598
    FT_ULong            image_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   599
    TT_SBit_MetricsRec  metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   600
    FT_ULong            num_glyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   601
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   602
    FT_ULong*           glyph_offsets;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   603
    FT_UShort*          glyph_codes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   604
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   605
    FT_ULong            table_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   606
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   607
  } TT_SBit_RangeRec, *TT_SBit_Range;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   608
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   609
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   610
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   611
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   612
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   613
  /*    TT_SBit_StrikeRec                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   614
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   615
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   616
  /*    A structure used describe a given bitmap strike in the `EBLC'      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   617
  /*    (Microsoft) or `bloc' (Apple) tables.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   618
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   619
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   620
  /*   num_index_ranges :: The number of index ranges.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   621
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   622
  /*   index_ranges     :: An array of glyph index ranges.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   623
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   624
  /*   color_ref        :: Unused.  `color_ref' is put in for future       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   625
  /*                       enhancements, but these fields are already      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   626
  /*                       in use by other platforms (e.g. Newton).        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   627
  /*                       For details, please see                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   628
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   629
  /*                         http://fonts.apple.com/                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   630
  /*                                TTRefMan/RM06/Chap6bloc.html           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   631
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   632
  /*   hori             :: The line metrics for horizontal layouts.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   633
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   634
  /*   vert             :: The line metrics for vertical layouts.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   635
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   636
  /*   start_glyph      :: The lowest glyph index for this strike.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   637
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   638
  /*   end_glyph        :: The highest glyph index for this strike.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   639
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   640
  /*   x_ppem           :: The number of horizontal pixels per EM.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   641
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   642
  /*   y_ppem           :: The number of vertical pixels per EM.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   643
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   644
  /*   bit_depth        :: The bit depth.  Valid values are 1, 2, 4,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   645
  /*                       and 8.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   646
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   647
  /*   flags            :: Is this a vertical or horizontal strike?  For   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   648
  /*                       details, please see                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   649
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   650
  /*                         http://fonts.apple.com/                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   651
  /*                                TTRefMan/RM06/Chap6bloc.html           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   652
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   653
  typedef struct  TT_SBit_StrikeRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   654
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   655
    FT_Int                  num_ranges;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   656
    TT_SBit_Range           sbit_ranges;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   657
    FT_ULong                ranges_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   658
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   659
    FT_ULong                color_ref;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   660
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   661
    TT_SBit_LineMetricsRec  hori;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   662
    TT_SBit_LineMetricsRec  vert;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   663
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   664
    FT_UShort               start_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   665
    FT_UShort               end_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   666
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   667
    FT_Byte                 x_ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   668
    FT_Byte                 y_ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   669
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   670
    FT_Byte                 bit_depth;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   671
    FT_Char                 flags;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   672
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   673
  } TT_SBit_StrikeRec, *TT_SBit_Strike;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   674
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   675
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   676
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   677
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   678
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   679
  /*    TT_SBit_ComponentRec                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   680
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   681
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   682
  /*    A simple structure to describe a compound sbit element.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   683
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   684
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   685
  /*    glyph_code :: The element's glyph index.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   686
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   687
  /*    x_offset   :: The element's left bearing.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   688
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   689
  /*    y_offset   :: The element's top bearing.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   690
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   691
  typedef struct  TT_SBit_ComponentRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   692
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   693
    FT_UShort  glyph_code;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   694
    FT_Char    x_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   695
    FT_Char    y_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   696
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   697
  } TT_SBit_ComponentRec, *TT_SBit_Component;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   698
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   699
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   700
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   701
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   702
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   703
  /*    TT_SBit_ScaleRec                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   704
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   705
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   706
  /*    A structure used describe a given bitmap scaling table, as defined */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   707
  /*    in the `EBSC' table.                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   708
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   709
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   710
  /*    hori              :: The horizontal line metrics.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   711
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   712
  /*    vert              :: The vertical line metrics.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   713
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   714
  /*    x_ppem            :: The number of horizontal pixels per EM.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   715
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   716
  /*    y_ppem            :: The number of vertical pixels per EM.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   717
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   718
  /*    x_ppem_substitute :: Substitution x_ppem value.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   719
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   720
  /*    y_ppem_substitute :: Substitution y_ppem value.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   721
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   722
  typedef struct  TT_SBit_ScaleRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   723
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   724
    TT_SBit_LineMetricsRec  hori;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   725
    TT_SBit_LineMetricsRec  vert;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   726
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   727
    FT_Byte                 x_ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   728
    FT_Byte                 y_ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   729
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   730
    FT_Byte                 x_ppem_substitute;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   731
    FT_Byte                 y_ppem_substitute;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   732
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   733
  } TT_SBit_ScaleRec, *TT_SBit_Scale;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   734
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   735
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   736
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   737
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   738
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   739
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   740
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   741
  /***                  POSTSCRIPT GLYPH NAMES SUPPORT                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   742
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   743
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   744
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   745
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   746
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   747
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   748
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   749
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   750
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   751
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   752
  /*    TT_Post_20Rec                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   753
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   754
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   755
  /*    Postscript names sub-table, format 2.0.  Stores the PS name of     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   756
  /*    each glyph in the font face.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   757
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   758
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   759
  /*    num_glyphs    :: The number of named glyphs in the table.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   760
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   761
  /*    num_names     :: The number of PS names stored in the table.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   762
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   763
  /*    glyph_indices :: The indices of the glyphs in the names arrays.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   764
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   765
  /*    glyph_names   :: The PS names not in Mac Encoding.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   766
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   767
  typedef struct  TT_Post_20Rec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   768
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   769
    FT_UShort   num_glyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   770
    FT_UShort   num_names;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   771
    FT_UShort*  glyph_indices;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   772
    FT_Char**   glyph_names;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   773
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   774
  } TT_Post_20Rec, *TT_Post_20;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   775
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   776
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   777
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   778
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   779
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   780
  /*    TT_Post_25Rec                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   781
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   782
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   783
  /*    Postscript names sub-table, format 2.5.  Stores the PS name of     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   784
  /*    each glyph in the font face.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   785
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   786
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   787
  /*    num_glyphs :: The number of glyphs in the table.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   788
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   789
  /*    offsets    :: An array of signed offsets in a normal Mac           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   790
  /*                  Postscript name encoding.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   791
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   792
  typedef struct  TT_Post_25_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   793
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   794
    FT_UShort  num_glyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   795
    FT_Char*   offsets;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   796
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   797
  } TT_Post_25Rec, *TT_Post_25;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   798
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   799
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   800
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   801
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   802
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   803
  /*    TT_Post_NamesRec                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   804
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   805
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   806
  /*    Postscript names table, either format 2.0 or 2.5.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   807
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   808
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   809
  /*    loaded    :: A flag to indicate whether the PS names are loaded.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   810
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   811
  /*    format_20 :: The sub-table used for format 2.0.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   812
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   813
  /*    format_25 :: The sub-table used for format 2.5.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   814
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   815
  typedef struct  TT_Post_NamesRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   816
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   817
    FT_Bool  loaded;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   818
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   819
    union
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   820
    {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   821
      TT_Post_20Rec  format_20;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   822
      TT_Post_25Rec  format_25;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   823
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   824
    } names;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   825
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   826
  } TT_Post_NamesRec, *TT_Post_Names;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   827
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   828
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   829
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   830
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   831
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   832
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   833
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   834
  /***                    GX VARIATION TABLE SUPPORT                     ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   835
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   836
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   837
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   838
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   839
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   840
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   841
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   842
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   843
  typedef struct GX_BlendRec_  *GX_Blend;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   844
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   845
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   846
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   847
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   848
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   849
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   850
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   851
  /***              EMBEDDED BDF PROPERTIES TABLE SUPPORT                ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   852
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   853
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   854
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   855
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   856
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   857
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   858
  /*
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   859
   * These types are used to support a `BDF ' table that isn't part of the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   860
   * official TrueType specification.  It is mainly used in SFNT-based
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   861
   * bitmap fonts that were generated from a set of BDF fonts.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   862
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   863
   * The format of the table is as follows.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   864
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   865
   *   USHORT   version      `BDF ' table version number, should be 0x0001.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   866
   *   USHORT   strikeCount  Number of strikes (bitmap sizes) in this table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   867
   *   ULONG    stringTable  Offset (from start of BDF table) to string
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   868
   *                         table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   869
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   870
   * This is followed by an array of `strikeCount' descriptors, having the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   871
   * following format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   872
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   873
   *   USHORT   ppem         Vertical pixels per EM for this strike.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   874
   *   USHORT   numItems     Number of items for this strike (properties and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   875
   *                         atoms).  Maximum is 255.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   876
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   877
   * This array in turn is followed by `strikeCount' value sets.  Each
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   878
   * `value set' is an array of `numItems' items with the following format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   879
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   880
   *   ULONG    item_name    Offset in string table to item name.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   881
   *   USHORT   item_type    The item type.  Possible values are
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   882
   *                            0 => string (e.g., COMMENT)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   883
   *                            1 => atom   (e.g., FONT or even SIZE)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   884
   *                            2 => int32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   885
   *                            3 => uint32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   886
   *                         0x10 => A flag to indicate a properties.  This
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   887
   *                                 is ORed with the above values.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   888
   *   ULONG    item_value   For strings  => Offset into string table without
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   889
   *                                         the corresponding double quotes.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   890
   *                         For atoms    => Offset into string table.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   891
   *                         For integers => Direct value.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   892
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   893
   * All strings in the string table consist of bytes and are
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   894
   * zero-terminated.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   895
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   896
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   897
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   898
#ifdef TT_CONFIG_OPTION_BDF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   899
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   900
  typedef struct  TT_BDFRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   901
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   902
    FT_Byte*   table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   903
    FT_Byte*   table_end;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   904
    FT_Byte*   strings;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   905
    FT_ULong   strings_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   906
    FT_UInt    num_strikes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   907
    FT_Bool    loaded;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   908
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   909
  } TT_BDFRec, *TT_BDF;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   910
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   911
#endif /* TT_CONFIG_OPTION_BDF */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   912
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   913
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   914
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   915
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   916
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   917
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   918
  /***                  ORIGINAL TT_FACE CLASS DEFINITION                ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   919
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   920
  /***                                                                   ***/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   921
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   922
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   923
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   924
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   925
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   926
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   927
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   928
  /* This structure/class is defined here because it is common to the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   929
  /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   930
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   931
  /* Note, however, that the classes TT_Size and TT_GlyphSlot are not      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   932
  /* shared between font drivers, and are thus defined in `ttobjs.h'.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   933
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   934
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   935
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   936
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   937
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   938
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   939
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   940
  /*    TT_Face                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   941
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   942
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   943
  /*    A handle to a TrueType face/font object.  A TT_Face encapsulates   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   944
  /*    the resolution and scaling independent parts of a TrueType font    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   945
  /*    resource.                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   946
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   947
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   948
  /*    The TT_Face structure is also used as a `parent class' for the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   949
  /*    OpenType-CFF class (T2_Face).                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   950
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   951
  typedef struct TT_FaceRec_*  TT_Face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   952
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   953
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   954
  /* a function type used for the truetype bytecode interpreter hooks */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   955
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   956
  (*TT_Interpreter)( void*  exec_context );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   957
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   958
  /* forward declaration */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   959
  typedef struct TT_LoaderRec_*  TT_Loader;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   960
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   961
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   962
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   963
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   964
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   965
  /*    TT_Loader_GotoTableFunc                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   966
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   967
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   968
  /*    Seeks a stream to the start of a given TrueType table.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   969
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   970
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   971
  /*    face   :: A handle to the target face object.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   972
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   973
  /*    tag    :: A 4-byte tag used to name the table.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   974
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   975
  /*    stream :: The input stream.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   976
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   977
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   978
  /*    length :: The length of the table in bytes.  Set to 0 if not       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   979
  /*              needed.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   980
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   981
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   982
  /*    FreeType error code.  0 means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   983
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   984
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   985
  /*    The stream cursor must be at the font file's origin.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   986
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   987
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   988
  (*TT_Loader_GotoTableFunc)( TT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   989
                              FT_ULong   tag,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   990
                              FT_Stream  stream,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   991
                              FT_ULong*  length );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   992
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   993
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   994
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   995
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   996
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   997
  /*    TT_Loader_StartGlyphFunc                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   998
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   999
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1000
  /*    Seeks a stream to the start of a given glyph element, and opens a  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1001
  /*    frame for it.                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1002
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1003
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1004
  /*    loader      :: The current TrueType glyph loader object.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1005
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1006
  /*    glyph index :: The index of the glyph to access.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1007
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1008
  /*    offset      :: The offset of the glyph according to the            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1009
  /*                   `locations' table.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1010
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1011
  /*    byte_count  :: The size of the frame in bytes.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1012
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1013
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1014
  /*    FreeType error code.  0 means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1015
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1016
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1017
  /*    This function is normally equivalent to FT_STREAM_SEEK(offset)     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1018
  /*    followed by FT_FRAME_ENTER(byte_count) with the loader's stream,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1019
  /*    but alternative formats (e.g. compressed ones) might use something */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1020
  /*    different.                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1021
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1022
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1023
  (*TT_Loader_StartGlyphFunc)( TT_Loader  loader,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1024
                               FT_UInt    glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1025
                               FT_ULong   offset,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1026
                               FT_UInt    byte_count );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1027
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1028
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1029
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1030
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1031
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1032
  /*    TT_Loader_ReadGlyphFunc                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1033
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1034
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1035
  /*    Reads one glyph element (its header, a simple glyph, or a          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1036
  /*    composite) from the loader's current stream frame.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1037
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1038
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1039
  /*    loader :: The current TrueType glyph loader object.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1040
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1041
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1042
  /*    FreeType error code.  0 means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1043
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1044
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1045
  (*TT_Loader_ReadGlyphFunc)( TT_Loader  loader );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1046
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1047
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1048
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1049
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1050
  /* <FuncType>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1051
  /*    TT_Loader_EndGlyphFunc                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1052
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1053
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1054
  /*    Closes the current loader stream frame for the glyph.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1055
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1056
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1057
  /*    loader :: The current TrueType glyph loader object.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1058
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1059
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1060
  (*TT_Loader_EndGlyphFunc)( TT_Loader  loader );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1061
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1062
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1063
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1064
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1065
  /*                         TrueType Face Type                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1066
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1067
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1068
  /*    TT_Face                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1069
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1070
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1071
  /*    The TrueType face class.  These objects model the resolution and   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1072
  /*    point-size independent data found in a TrueType font file.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1073
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1074
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1075
  /*    root                 :: The base FT_Face structure, managed by the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1076
  /*                            base layer.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1077
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1078
  /*    ttc_header           :: The TrueType collection header, used when  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1079
  /*                            the file is a `ttc' rather than a `ttf'.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1080
  /*                            For ordinary font files, the field         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1081
  /*                            `ttc_header.count' is set to 0.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1082
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1083
  /*    format_tag           :: The font format tag.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1084
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1085
  /*    num_tables           :: The number of TrueType tables in this font */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1086
  /*                            file.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1087
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1088
  /*    dir_tables           :: The directory of TrueType tables for this  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1089
  /*                            font file.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1090
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1091
  /*    header               :: The font's font header (`head' table).     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1092
  /*                            Read on font opening.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1093
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1094
  /*    horizontal           :: The font's horizontal header (`hhea'       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1095
  /*                            table).  This field also contains the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1096
  /*                            associated horizontal metrics table        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1097
  /*                            (`hmtx').                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1098
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1099
  /*    max_profile          :: The font's maximum profile table.  Read on */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1100
  /*                            font opening.  Note that some maximum      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1101
  /*                            values cannot be taken directly from this  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1102
  /*                            table.  We thus define additional fields   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1103
  /*                            below to hold the computed maxima.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1104
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1105
  /*    vertical_info        :: A boolean which is set when the font file  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1106
  /*                            contains vertical metrics.  If not, the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1107
  /*                            value of the `vertical' field is           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1108
  /*                            undefined.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1109
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1110
  /*    vertical             :: The font's vertical header (`vhea' table). */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1111
  /*                            This field also contains the associated    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1112
  /*                            vertical metrics table (`vmtx'), if found. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1113
  /*                            IMPORTANT: The contents of this field is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1114
  /*                            undefined if the `verticalInfo' field is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1115
  /*                            unset.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1116
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1117
  /*    num_names            :: The number of name records within this     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1118
  /*                            TrueType font.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1119
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1120
  /*    name_table           :: The table of name records (`name').        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1121
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1122
  /*    os2                  :: The font's OS/2 table (`OS/2').            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1123
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1124
  /*    postscript           :: The font's PostScript table (`post'        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1125
  /*                            table).  The PostScript glyph names are    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1126
  /*                            not loaded by the driver on face opening.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1127
  /*                            See the `ttpost' module for more details.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1129
  /*    cmap_table           :: Address of the face's `cmap' SFNT table    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1130
  /*                            in memory (it's an extracted frame).       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1131
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1132
  /*    cmap_size            :: The size in bytes of the `cmap_table'      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1133
  /*                            described above.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1134
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1135
  /*    goto_table           :: A function called by each TrueType table   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1136
  /*                            loader to position a stream's cursor to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1137
  /*                            the start of a given table according to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1138
  /*                            its tag.  It defaults to TT_Goto_Face but  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1139
  /*                            can be different for strange formats (e.g. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1140
  /*                            Type 42).                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1141
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1142
  /*    access_glyph_frame   :: A function used to access the frame of a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1143
  /*                            given glyph within the face's font file.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1144
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1145
  /*    forget_glyph_frame   :: A function used to forget the frame of a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1146
  /*                            given glyph when all data has been loaded. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1147
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1148
  /*    read_glyph_header    :: A function used to read a glyph header.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1149
  /*                            It must be called between an `access' and  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1150
  /*                            `forget'.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1151
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1152
  /*    read_simple_glyph    :: A function used to read a simple glyph.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1153
  /*                            It must be called after the header was     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1154
  /*                            read, and before the `forget'.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1155
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1156
  /*    read_composite_glyph :: A function used to read a composite glyph. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1157
  /*                            It must be called after the header was     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1158
  /*                            read, and before the `forget'.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1159
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1160
  /*    sfnt                 :: A pointer to the SFNT service.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1161
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1162
  /*    psnames              :: A pointer to the PostScript names service. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1163
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1164
  /*    hdmx                 :: The face's horizontal device metrics       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1165
  /*                            (`hdmx' table).  This table is optional in */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1166
  /*                            TrueType/OpenType fonts.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1167
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1168
  /*    gasp                 :: The grid-fitting and scaling properties    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1169
  /*                            table (`gasp').  This table is optional in */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1170
  /*                            TrueType/OpenType fonts.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1171
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1172
  /*    pclt                 :: The `pclt' SFNT table.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1173
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1174
  /*    num_sbit_strikes     :: The number of sbit strikes, i.e., bitmap   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1175
  /*                            sizes, embedded in this font.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1176
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1177
  /*    sbit_strikes         :: An array of sbit strikes embedded in this  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1178
  /*                            font.  This table is optional in a         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1179
  /*                            TrueType/OpenType font.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1180
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1181
  /*    num_sbit_scales      :: The number of sbit scales for this font.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1182
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1183
  /*    sbit_scales          :: Array of sbit scales embedded in this      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1184
  /*                            font.  This table is optional in a         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1185
  /*                            TrueType/OpenType font.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1186
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1187
  /*    postscript_names     :: A table used to store the Postscript names */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1188
  /*                            of  the glyphs for this font.  See the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1189
  /*                            file  `ttconfig.h' for comments on the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1190
  /*                            TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1191
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1192
  /*    num_locations        :: The number of glyph locations in this      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1193
  /*                            TrueType file.  This should be             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1194
  /*                            identical to the number of glyphs.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1195
  /*                            Ignored for Type 2 fonts.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1196
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1197
  /*    glyph_locations      :: An array of longs.  These are offsets to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1198
  /*                            glyph data within the `glyf' table.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1199
  /*                            Ignored for Type 2 font faces.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1200
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1201
  /*    glyf_len             :: The length of the `glyf' table.  Needed    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1202
  /*                            for malformed `loca' tables.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1203
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1204
  /*    font_program_size    :: Size in bytecodes of the face's font       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1205
  /*                            program.  0 if none defined.  Ignored for  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1206
  /*                            Type 2 fonts.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1207
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1208
  /*    font_program         :: The face's font program (bytecode stream)  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1209
  /*                            executed at load time, also used during    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1210
  /*                            glyph rendering.  Comes from the `fpgm'    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1211
  /*                            table.  Ignored for Type 2 font fonts.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1212
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1213
  /*    cvt_program_size     :: The size in bytecodes of the face's cvt    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1214
  /*                            program.  Ignored for Type 2 fonts.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1215
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1216
  /*    cvt_program          :: The face's cvt program (bytecode stream)   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1217
  /*                            executed each time an instance/size is     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1218
  /*                            changed/reset.  Comes from the `prep'      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1219
  /*                            table.  Ignored for Type 2 fonts.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1220
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1221
  /*    cvt_size             :: Size of the control value table (in        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1222
  /*                            entries).   Ignored for Type 2 fonts.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1223
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1224
  /*    cvt                  :: The face's original control value table.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1225
  /*                            Coordinates are expressed in unscaled font */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1226
  /*                            units.  Comes from the `cvt ' table.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1227
  /*                            Ignored for Type 2 fonts.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1228
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1229
  /*    num_kern_pairs       :: The number of kerning pairs present in the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1230
  /*                            font file.  The engine only loads the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1231
  /*                            first horizontal format 0 kern table it    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1232
  /*                            finds in the font file.  Ignored for       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1233
  /*                            Type 2 fonts.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1234
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1235
  /*    kern_table_index     :: The index of the kerning table in the font */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1236
  /*                            kerning directory.  Ignored for Type 2     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1237
  /*                            fonts.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1238
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1239
  /*    interpreter          :: A pointer to the TrueType bytecode         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1240
  /*                            interpreters field is also used to hook    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1241
  /*                            the debugger in `ttdebug'.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1242
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1243
  /*    unpatented_hinting   :: If true, use only unpatented methods in    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1244
  /*                            the bytecode interpreter.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1245
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1246
  /*    doblend              :: A boolean which is set if the font should  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1247
  /*                            be blended (this is for GX var).           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1248
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1249
  /*    blend                :: Contains the data needed to control GX     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1250
  /*                            variation tables (rather like Multiple     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1251
  /*                            Master data).                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1252
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1253
  /*    extra                :: Reserved for third-party font drivers.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1254
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1255
  /*    postscript_name      :: The PS name of the font.  Used by the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1256
  /*                            postscript name service.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1257
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1258
  typedef struct  TT_FaceRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1259
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1260
    FT_FaceRec            root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1261
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1262
    TTC_HeaderRec         ttc_header;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1263
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1264
    FT_ULong              format_tag;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1265
    FT_UShort             num_tables;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1266
    TT_Table              dir_tables;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1267
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1268
    TT_Header             header;       /* TrueType header table          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1269
    TT_HoriHeader         horizontal;   /* TrueType horizontal header     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1270
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1271
    TT_MaxProfile         max_profile;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1272
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1273
    FT_ULong              max_components;  /* stubbed to 0 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1274
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1275
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1276
    FT_Bool               vertical_info;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1277
    TT_VertHeader         vertical;     /* TT Vertical header, if present */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1278
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1279
    FT_UShort             num_names;    /* number of name records  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1280
    TT_NameTableRec       name_table;   /* name table              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1281
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1282
    TT_OS2                os2;          /* TrueType OS/2 table            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1283
    TT_Postscript         postscript;   /* TrueType Postscript table      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1284
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1285
    FT_Byte*              cmap_table;   /* extracted `cmap' table */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1286
    FT_ULong              cmap_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1287
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1288
    TT_Loader_GotoTableFunc   goto_table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1289
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1290
    TT_Loader_StartGlyphFunc  access_glyph_frame;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1291
    TT_Loader_EndGlyphFunc    forget_glyph_frame;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1292
    TT_Loader_ReadGlyphFunc   read_glyph_header;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1293
    TT_Loader_ReadGlyphFunc   read_simple_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1294
    TT_Loader_ReadGlyphFunc   read_composite_glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1295
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1296
    /* a typeless pointer to the SFNT_Interface table used to load */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1297
    /* the basic TrueType tables in the face object                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1298
    void*                 sfnt;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1299
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1300
    /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1301
    /* handle glyph names <-> unicode & Mac values                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1302
    void*                 psnames;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1303
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1304
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1305
    /***********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1306
    /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1307
    /* Optional TrueType/OpenType tables                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1308
    /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1309
    /***********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1310
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1311
    /* horizontal device metrics */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1312
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1313
    TT_HdmxRec            hdmx;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1314
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1315
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1316
    /* grid-fitting and scaling table */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1317
    TT_GaspRec            gasp;                 /* the `gasp' table */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1318
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1319
    /* PCL 5 table */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1320
    TT_PCLT               pclt;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1321
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1322
    /* embedded bitmaps support */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1323
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1324
    FT_ULong              num_sbit_strikes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1325
    TT_SBit_Strike        sbit_strikes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1326
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1327
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1328
    FT_ULong              num_sbit_scales;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1329
    TT_SBit_Scale         sbit_scales;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1330
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1331
    /* postscript names table */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1332
    TT_Post_NamesRec      postscript_names;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1333
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1334
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1335
    /***********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1336
    /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1337
    /* TrueType-specific fields (ignored by the OTF-Type2 driver)          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1338
    /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1339
    /***********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1340
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1341
    /* the glyph locations */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1342
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1343
    FT_UShort             num_locations_stub;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1344
    FT_Long*              glyph_locations_stub;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1345
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1346
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1347
    /* the font program, if any */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1348
    FT_ULong              font_program_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1349
    FT_Byte*              font_program;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1350
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1351
    /* the cvt program, if any */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1352
    FT_ULong              cvt_program_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1353
    FT_Byte*              cvt_program;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1354
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1355
    /* the original, unscaled, control value table */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1356
    FT_ULong              cvt_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1357
    FT_Short*             cvt;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1358
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1359
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1360
    /* the format 0 kerning table, if any */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1361
    FT_Int                num_kern_pairs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1362
    FT_Int                kern_table_index;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1363
    TT_Kern0_Pair         kern_pairs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1364
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1365
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1366
    /* A pointer to the bytecode interpreter to use.  This is also */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1367
    /* used to hook the debugger for the `ttdebug' utility.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1368
    TT_Interpreter        interpreter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1369
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1370
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1371
    /* Use unpatented hinting only. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1372
    FT_Bool               unpatented_hinting;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1373
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1374
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1375
    /***********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1376
    /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1377
    /* Other tables or fields. This is used by derivative formats like     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1378
    /* OpenType.                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1379
    /*                                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1380
    /***********************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1381
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1382
    FT_Generic            extra;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1383
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1384
    const char*           postscript_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1385
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1386
    /* since version 2.1.8, but was originally placed after */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1387
    /* `glyph_locations_stub'                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1388
    FT_ULong              glyf_len;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1389
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1390
    /* since version 2.1.8, but was originally placed before `extra' */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1391
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1392
    FT_Bool               doblend;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1393
    GX_Blend              blend;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1394
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1395
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1396
    /* since version 2.2 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1397
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1398
    FT_Byte*              horz_metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1399
    FT_ULong              horz_metrics_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1400
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1401
    FT_Byte*              vert_metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1402
    FT_ULong              vert_metrics_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1403
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1404
    FT_ULong              num_locations; /* in broken TTF, gid > 0xFFFF */ 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1405
    FT_Byte*              glyph_locations;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1406
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1407
    FT_Byte*              hdmx_table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1408
    FT_ULong              hdmx_table_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1409
    FT_UInt               hdmx_record_count;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1410
    FT_ULong              hdmx_record_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1411
    FT_Byte*              hdmx_record_sizes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1412
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1413
    FT_Byte*              sbit_table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1414
    FT_ULong              sbit_table_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1415
    FT_UInt               sbit_num_strikes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1416
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1417
    FT_Byte*              kern_table;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1418
    FT_ULong              kern_table_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1419
    FT_UInt               num_kern_tables;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1420
    FT_UInt32             kern_avail_bits;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1421
    FT_UInt32             kern_order_bits;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1422
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1423
#ifdef TT_CONFIG_OPTION_BDF
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1424
    TT_BDFRec             bdf;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1425
#endif /* TT_CONFIG_OPTION_BDF */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1426
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1427
    /* since 2.3.0 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1428
    FT_ULong              horz_metrics_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1429
    FT_ULong              vert_metrics_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1430
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1431
  } TT_FaceRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1432
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1433
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1434
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1435
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1436
  /*  <Struct>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1437
  /*     TT_GlyphZoneRec                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1438
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1439
  /*  <Description>                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1440
  /*     A glyph zone is used to load, scale and hint glyph outline        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1441
  /*     coordinates.                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1442
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1443
  /*  <Fields>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1444
  /*     memory       :: A handle to the memory manager.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1445
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1446
  /*     max_points   :: The maximal size in points of the zone.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1447
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1448
  /*     max_contours :: Max size in links contours of the zone.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1449
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1450
  /*     n_points     :: The current number of points in the zone.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1451
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1452
  /*     n_contours   :: The current number of contours in the zone.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1453
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1454
  /*     org          :: The original glyph coordinates (font              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1455
  /*                     units/scaled).                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1456
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1457
  /*     cur          :: The current glyph coordinates (scaled/hinted).    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1458
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1459
  /*     tags         :: The point control tags.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1460
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1461
  /*     contours     :: The contours end points.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1462
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1463
  /*     first_point  :: Offset of the current subglyph's first point.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1464
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1465
  typedef struct  TT_GlyphZoneRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1466
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1467
    FT_Memory   memory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1468
    FT_UShort   max_points;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1469
    FT_UShort   max_contours;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1470
    FT_UShort   n_points;    /* number of points in zone    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1471
    FT_Short    n_contours;  /* number of contours          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1472
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1473
    FT_Vector*  org;         /* original point coordinates  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1474
    FT_Vector*  cur;         /* current point coordinates   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1475
    FT_Vector*  orus;        /* original (unscaled) point coordinates */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1476
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1477
    FT_Byte*    tags;        /* current touch flags         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1478
    FT_UShort*  contours;    /* contour end points          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1479
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1480
    FT_UShort   first_point; /* offset of first (#0) point  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1481
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1482
  } TT_GlyphZoneRec, *TT_GlyphZone;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1483
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1484
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1485
  /* handle to execution context */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1486
  typedef struct TT_ExecContextRec_*  TT_ExecContext;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1487
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1488
  /* glyph loader structure */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1489
  typedef struct  TT_LoaderRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1490
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1491
    FT_Face          face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1492
    FT_Size          size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1493
    FT_GlyphSlot     glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1494
    FT_GlyphLoader   gloader;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1495
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1496
    FT_ULong         load_flags;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1497
    FT_UInt          glyph_index;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1498
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1499
    FT_Stream        stream;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1500
    FT_Int           byte_len;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1501
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1502
    FT_Short         n_contours;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1503
    FT_BBox          bbox;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1504
    FT_Int           left_bearing;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1505
    FT_Int           advance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1506
    FT_Int           linear;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1507
    FT_Bool          linear_def;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1508
    FT_Bool          preserve_pps;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1509
    FT_Vector        pp1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1510
    FT_Vector        pp2;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1511
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1512
    FT_ULong         glyf_offset;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1513
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1514
    /* the zone where we load our glyphs */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1515
    TT_GlyphZoneRec  base;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1516
    TT_GlyphZoneRec  zone;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1517
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1518
    TT_ExecContext   exec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1519
    FT_Byte*         instructions;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1520
    FT_ULong         ins_pos;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1521
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1522
    /* for possible extensibility in other formats */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1523
    void*            other;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1524
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1525
    /* since version 2.1.8 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1526
    FT_Int           top_bearing;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1527
    FT_Int           vadvance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1528
    FT_Vector        pp3;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1529
    FT_Vector        pp4;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1530
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1531
    /* since version 2.2.1 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1532
    FT_Byte*         cursor;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1533
    FT_Byte*         limit;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1534
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1535
  } TT_LoaderRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1536
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1537
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1538
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1539
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1540
#endif /* __TTTYPES_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1541
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1542
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1543
/* END */