misc/libfreetype/include/freetype/ftincrem.h
author Xeli
Fri, 07 Oct 2011 14:17:07 +0200
branchhedgeroid
changeset 6035 bdd0528ee8a6
parent 5172 88f2e05288ba
permissions -rw-r--r--
Close a game without leaking memory. It should be noted that sending an SDL Quit event leaks memory
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
/*  ftincrem.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
/*    FreeType incremental loading (specification).                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 2002, 2003, 2006, 2007, 2008, 2010 by                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
#ifndef __FTINCREM_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTINCREM_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
   * @section:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
   *    incremental
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
   * @title:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
   *    Incremental Loading
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
   * @abstract:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
   *    Custom Glyph Loading.
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
   *   This section contains various functions used to perform so-called
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
   *   `incremental' glyph loading.  This is a mode where all glyphs loaded
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
   *   from a given @FT_Face are provided by the client application,
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
   *   Apart from that, all other tables are loaded normally from the font
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
   *   file.  This mode is useful when FreeType is used within another
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
   *   engine, e.g., a PostScript Imaging Processor.
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
   *   To enable this mode, you must use @FT_Open_Face, passing an
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
   *   @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
   *   @FT_Incremental_Interface value.  See the comments for
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
   *   @FT_Incremental_InterfaceRec for an example.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
   *   FT_Incremental
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
   *   An opaque type describing a user-provided object used to implement
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
   *   `incremental' glyph loading within FreeType.  This is used to support
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
   *   embedded fonts in certain environments (e.g., PostScript interpreters),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
   *   where the glyph data isn't in the font file, or must be overridden by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
   *   different values.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
   *   It is up to client applications to create and implement @FT_Incremental
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
   *   objects, as long as they provide implementations for the methods
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
   *   @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
   *   and @FT_Incremental_GetGlyphMetricsFunc.
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
   *   See the description of @FT_Incremental_InterfaceRec to understand how
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
   *   to use incremental objects with FreeType.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  typedef struct FT_IncrementalRec_*  FT_Incremental;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
   *   FT_Incremental_MetricsRec
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
   *   A small structure used to contain the basic glyph metrics returned
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
   *   by the @FT_Incremental_GetGlyphMetricsFunc method.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
   * @fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
   *   bearing_x ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
   *     Left bearing, in font units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
   *   bearing_y ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
   *     Top bearing, in font units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
   *   advance ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
   *     Horizontal component of glyph advance, in font units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
   *   advance_v ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
   *     Vertical component of glyph advance, in font units.
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
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
   *   These correspond to horizontal or vertical metrics depending on the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
   *   value of the `vertical' argument to the function
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
   *   @FT_Incremental_GetGlyphMetricsFunc.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  typedef struct  FT_Incremental_MetricsRec_
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
    FT_Long  bearing_x;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
    FT_Long  bearing_y;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
    FT_Long  advance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
    FT_Long  advance_v;     /* since 2.3.12 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
  } FT_Incremental_MetricsRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
   *   FT_Incremental_Metrics
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
   *   A handle to an @FT_Incremental_MetricsRec structure.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
   typedef struct FT_Incremental_MetricsRec_*  FT_Incremental_Metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
   *   FT_Incremental_GetGlyphDataFunc
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
   *   A function called by FreeType to access a given glyph's data bytes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
   *   during @FT_Load_Glyph or @FT_Load_Char if incremental loading is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
   *   enabled.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
   *   Note that the format of the glyph's data bytes depends on the font
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
   *   file format.  For TrueType, it must correspond to the raw bytes within
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
   *   the `glyf' table.  For PostScript formats, it must correspond to the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
   *   *unencrypted* charstring bytes, without any `lenIV' header.  It is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
   *   undefined for any other format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
   *   incremental ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
   *     Handle to an opaque @FT_Incremental handle provided by the client
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
   *     application.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
   *   glyph_index ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
   *     Index of relevant glyph.
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
   * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
   *   adata ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
   *     A structure describing the returned glyph data bytes (which will be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
   *     accessed as a read-only byte block).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
   *   FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
   *   If this function returns successfully the method
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
   *   @FT_Incremental_FreeGlyphDataFunc will be called later to release
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
   *   the data bytes.
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
   *   Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
   *   compound glyphs.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
  (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental  incremental,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
                                      FT_UInt         glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
                                      FT_Data*        adata );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
   *   FT_Incremental_FreeGlyphDataFunc
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
   *   A function used to release the glyph data bytes returned by a
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
   *   successful call to @FT_Incremental_GetGlyphDataFunc.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
   *   incremental ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
   *     A handle to an opaque @FT_Incremental handle provided by the client
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
   *     application.
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
   *   data ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
   *     A structure describing the glyph data bytes (which will be accessed
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
   *     as a read-only byte block).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
  typedef void
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
  (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental  incremental,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
                                       FT_Data*        data );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
   *   FT_Incremental_GetGlyphMetricsFunc
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
   *   A function used to retrieve the basic metrics of a given glyph index
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
   *   before accessing its data.  This is necessary because, in certain
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
   *   formats like TrueType, the metrics are stored in a different place from
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
   *   the glyph images proper.
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
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
   *   incremental ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
   *     A handle to an opaque @FT_Incremental handle provided by the client
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
   *     application.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
   *   glyph_index ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
   *     Index of relevant glyph.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
   *   vertical ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
   *     If true, return vertical metrics.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
   *   ametrics ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
   *     This parameter is used for both input and output.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
   *     The original glyph metrics, if any, in font units.  If metrics are
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
   *     not available all the values must be set to zero.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
   * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
   *   ametrics ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
   *     The replacement glyph metrics in font units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
  typedef FT_Error
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
  (*FT_Incremental_GetGlyphMetricsFunc)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
                      ( FT_Incremental              incremental,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
                        FT_UInt                     glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
                        FT_Bool                     vertical,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
                        FT_Incremental_MetricsRec  *ametrics );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
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
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
   *   FT_Incremental_FuncsRec
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
   *   A table of functions for accessing fonts that load data
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
   *   incrementally.  Used in @FT_Incremental_InterfaceRec.
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
   * @fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
   *   get_glyph_data ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
   *     The function to get glyph data.  Must not be null.
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
   *   free_glyph_data ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
   *     The function to release glyph data.  Must not be null.
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
   *   get_glyph_metrics ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
   *     The function to get glyph metrics.  May be null if the font does
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
   *     not provide overriding glyph metrics.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  typedef struct  FT_Incremental_FuncsRec_
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
    FT_Incremental_GetGlyphDataFunc     get_glyph_data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
    FT_Incremental_FreeGlyphDataFunc    free_glyph_data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
    FT_Incremental_GetGlyphMetricsFunc  get_glyph_metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  } FT_Incremental_FuncsRec;
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
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
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
   * @struct:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
   *   FT_Incremental_InterfaceRec
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
   *   A structure to be used with @FT_Open_Face to indicate that the user
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
   *   wants to support incremental glyph loading.  You should use it with
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
   *   @FT_PARAM_TAG_INCREMENTAL as in the following example:
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
   *       FT_Incremental_InterfaceRec  inc_int;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
   *       FT_Parameter                 parameter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
   *       FT_Open_Args                 open_args;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
   *
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
   *       // set up incremental descriptor
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
   *       inc_int.funcs  = my_funcs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
   *       inc_int.object = my_object;
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
   *       // set up optional parameter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
   *       parameter.tag  = FT_PARAM_TAG_INCREMENTAL;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
   *       parameter.data = &inc_int;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
   *       // set up FT_Open_Args structure
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
   *       open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
   *       open_args.pathname   = my_font_pathname;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
   *       open_args.num_params = 1;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
   *       open_args.params     = &parameter; // we use one optional argument
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
   *       // open the font
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
   *       error = FT_Open_Face( library, &open_args, index, &face );
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
   *     }
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
  typedef struct  FT_Incremental_InterfaceRec_
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
    const FT_Incremental_FuncsRec*  funcs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
    FT_Incremental                  object;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
  } FT_Incremental_InterfaceRec;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
   *   FT_Incremental_Interface
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
   *   A pointer to an @FT_Incremental_InterfaceRec structure.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
  typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
   * @constant:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
   *   FT_PARAM_TAG_INCREMENTAL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
   *   A constant used as the tag of @FT_Parameter structures to indicate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
   *   an incremental loading object to be used by FreeType.
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
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
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
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
FT_END_HEADER
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
#endif /* __FTINCREM_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
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
/* END */