misc/libfreetype/include/freetype/ftglyph.h
author unc0rr
Mon, 04 Feb 2013 00:13:55 +0400
changeset 8479 8d71109b04d2
parent 5172 88f2e05288ba
permissions -rw-r--r--
Some work on loading replay and interaction with checker
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
/*  ftglyph.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 convenience functions to handle glyphs (specification).     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 1996-2003, 2006, 2008, 2009, 2011 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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /* This file contains the definition of several convenience functions    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /* that can be used by client applications to easily retrieve glyph      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /* bitmaps and outlines from a given face.                               */
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
  /* These functions should be optional if you are writing a font server   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
  /* or text layout engine on top of FreeType.  However, they are pretty   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
  /* handy for many other simple uses of the library.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
  /*************************************************************************/
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
#ifndef __FTGLYPH_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
#define __FTGLYPH_H__
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
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
#include FT_FREETYPE_H
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
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
#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
    41
#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
    42
#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
    43
#endif
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
FT_BEGIN_HEADER
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
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /*    glyph_management                                                   */
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
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /*    Glyph Management                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  /*    Generic interface to manage individual glyph data.                 */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
  /*    This section contains definitions used to manage glyph data        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
  /*    through generic FT_Glyph objects.  Each of them can contain a      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /*    bitmap, a vector outline, or even images in other formats.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  /* forward declaration to a private type */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  typedef struct FT_Glyph_Class_  FT_Glyph_Class;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  /*    FT_Glyph                                                           */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  /*    Handle to an object used to model generic glyph images.  It is a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  /*    pointer to the @FT_GlyphRec structure and can contain a glyph      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  /*    bitmap or pointer.                                                 */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  /*    Glyph objects are not owned by the library.  You must thus release */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  /*    them manually (through @FT_Done_Glyph) _before_ calling            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  /*    @FT_Done_FreeType.                                                 */
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
  typedef struct FT_GlyphRec_*  FT_Glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  /*    FT_GlyphRec                                                        */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /*    The root glyph structure contains a given glyph image plus its     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  /*    advance width in 16.16 fixed float format.                         */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
  /*    library :: A handle to the FreeType library object.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  /*    clazz   :: A pointer to the glyph's class.  Private.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  /*    format  :: The format of the glyph's image.                        */
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 :: A 16.16 vector that gives the glyph's advance width.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  typedef struct  FT_GlyphRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
    FT_Library             library;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
    const FT_Glyph_Class*  clazz;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
    FT_Glyph_Format        format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
    FT_Vector              advance;
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
  } FT_GlyphRec;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  /*    FT_BitmapGlyph                                                     */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /*    A handle to an object used to model a bitmap glyph image.  This is */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*    a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.     */
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
  typedef struct FT_BitmapGlyphRec_*  FT_BitmapGlyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*    FT_BitmapGlyphRec                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /*    A structure used for bitmap glyph images.  This really is a        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*    `sub-class' of @FT_GlyphRec.                                       */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*    root   :: The root @FT_Glyph fields.                               */
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
  /*    left   :: The left-side bearing, i.e., the horizontal distance     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*              from the current pen position to the left border of the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /*              glyph bitmap.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*    top    :: The top-side bearing, i.e., the vertical distance from   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*              the current pen position to the top border of the glyph  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  /*              bitmap.  This distance is positive for upwards~y!        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  /*    bitmap :: A descriptor for the bitmap.                             */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
  /*    You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
  /*    `glyph->format == FT_GLYPH_FORMAT_BITMAP'.  This lets you access   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  /*    the bitmap's contents easily.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
  /*    The corresponding pixel buffer is always owned by @FT_BitmapGlyph  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
  /*    and is thus created and destroyed with it.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
  typedef struct  FT_BitmapGlyphRec_
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
    FT_GlyphRec  root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
    FT_Int       left;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
    FT_Int       top;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
    FT_Bitmap    bitmap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
  } FT_BitmapGlyphRec;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
  /*    FT_OutlineGlyph                                                    */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
  /*    A handle to an object used to model an outline glyph image.  This  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  /*    is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */
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
  typedef struct FT_OutlineGlyphRec_*  FT_OutlineGlyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
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
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  /*    FT_OutlineGlyphRec                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
  /*    A structure used for outline (vectorial) glyph images.  This       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  /*    really is a `sub-class' of @FT_GlyphRec.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
  /*    root    :: The root @FT_Glyph fields.                              */
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
  /*    outline :: A descriptor for the outline.                           */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
  /*    You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
  /*    `glyph->format == FT_GLYPH_FORMAT_OUTLINE'.  This lets you access  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
  /*    the outline's content easily.                                      */
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
  /*    As the outline is extracted from a glyph slot, its coordinates are */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
  /*    expressed normally in 26.6 pixels, unless the flag                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
  /*    @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
  /*    The outline's tables are always owned by the object and are        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
  /*    destroyed with it.                                                 */
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
  typedef struct  FT_OutlineGlyphRec_
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
    FT_GlyphRec  root;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
    FT_Outline   outline;
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_OutlineGlyphRec;
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
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
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
  /*    FT_Get_Glyph                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
  /*    A function used to extract a glyph image from a slot.  Note that   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
  /*    the created @FT_Glyph object must be released with @FT_Done_Glyph. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
  /*    slot   :: A handle to the source glyph slot.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  /*    aglyph :: A handle to the glyph object.                            */
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
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  /*    FreeType error code.  0~means success.                             */
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
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  FT_Get_Glyph( FT_GlyphSlot  slot,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
                FT_Glyph     *aglyph );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
  /*    FT_Glyph_Copy                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
  /*    A function used to copy a glyph image.  Note that the created      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
  /*    @FT_Glyph object must be released with @FT_Done_Glyph.             */
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
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
  /*    source :: A handle to the source glyph object.                     */
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
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
  /*    target :: A handle to the target glyph object.  0~in case of       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
  /*              error.                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
  /*    FreeType error code.  0~means success.                             */
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
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  FT_Glyph_Copy( FT_Glyph   source,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
                 FT_Glyph  *target );
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  /*    FT_Glyph_Transform                                                 */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /*    Transform a glyph image if its format is scalable.                 */
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
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /*    glyph  :: A handle to the target glyph object.                     */
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
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /*    matrix :: A pointer to a 2x2 matrix to apply.                      */
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
  /*    delta  :: A pointer to a 2d vector to apply.  Coordinates are      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
  /*              expressed in 1/64th of a pixel.                          */
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
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  /*    FreeType error code (if not 0, the glyph format is not scalable).  */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
  /*    The 2x2 transformation matrix is also applied to the glyph's       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  /*    advance vector.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  FT_Glyph_Transform( FT_Glyph    glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
                      FT_Matrix*  matrix,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
                      FT_Vector*  delta );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
  /*    FT_Glyph_BBox_Mode                                                 */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
  /*    The mode how the values of @FT_Glyph_Get_CBox are returned.        */
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
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  /*    FT_GLYPH_BBOX_UNSCALED ::                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
  /*      Return unscaled font units.                                      */
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
  /*    FT_GLYPH_BBOX_SUBPIXELS ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
  /*      Return unfitted 26.6 coordinates.                                */
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
  /*    FT_GLYPH_BBOX_GRIDFIT ::                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
  /*      Return grid-fitted 26.6 coordinates.                             */
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
  /*    FT_GLYPH_BBOX_TRUNCATE ::                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
  /*      Return coordinates in integer pixels.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
  /*    FT_GLYPH_BBOX_PIXELS ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
  /*      Return grid-fitted pixel coordinates.                            */
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
  typedef enum  FT_Glyph_BBox_Mode_
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_GLYPH_BBOX_UNSCALED  = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
    FT_GLYPH_BBOX_SUBPIXELS = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
    FT_GLYPH_BBOX_GRIDFIT   = 1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
    FT_GLYPH_BBOX_TRUNCATE  = 2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
    FT_GLYPH_BBOX_PIXELS    = 3
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
  } FT_Glyph_BBox_Mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
  /*    ft_glyph_bbox_xxx                                                  */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
  /*    These constants are deprecated.  Use the corresponding             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
  /*    @FT_Glyph_BBox_Mode values instead.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
  /*   ft_glyph_bbox_unscaled  :: See @FT_GLYPH_BBOX_UNSCALED.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
  /*   ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
  /*   ft_glyph_bbox_gridfit   :: See @FT_GLYPH_BBOX_GRIDFIT.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
  /*   ft_glyph_bbox_truncate  :: See @FT_GLYPH_BBOX_TRUNCATE.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
  /*   ft_glyph_bbox_pixels    :: See @FT_GLYPH_BBOX_PIXELS.               */
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_glyph_bbox_unscaled   FT_GLYPH_BBOX_UNSCALED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
#define ft_glyph_bbox_subpixels  FT_GLYPH_BBOX_SUBPIXELS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
#define ft_glyph_bbox_gridfit    FT_GLYPH_BBOX_GRIDFIT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
#define ft_glyph_bbox_truncate   FT_GLYPH_BBOX_TRUNCATE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
#define ft_glyph_bbox_pixels     FT_GLYPH_BBOX_PIXELS
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
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
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
  /*    FT_Glyph_Get_CBox                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
  /*    Return a glyph's `control box'.  The control box encloses all the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
  /*    outline's points, including Bézier control points.  Though it      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
  /*    coincides with the exact bounding box for most glyphs, it can be   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
  /*    slightly larger in some situations (like when rotating an outline  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
  /*    which contains Bézier outside arcs).                               */
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
  /*    Computing the control box is very fast, while getting the bounding */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
  /*    box can take much more time as it needs to walk over all segments  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
  /*    and arcs in the outline.  To get the latter, you can use the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
  /*    `ftbbox' component which is dedicated to this single task.         */
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
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
  /*    glyph :: A handle to the source glyph object.                      */
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
  /*    mode  :: The mode which indicates how to interpret the returned    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
  /*             bounding box values.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
  /*    acbox :: The glyph coordinate bounding box.  Coordinates are       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
  /*             expressed in 1/64th of pixels if it is grid-fitted.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
  /*    Coordinates are relative to the glyph origin, using the y~upwards  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
  /*    convention.                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
  /*    If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode'   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
  /*    must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
  /*    units in 26.6 pixel format.  The value @FT_GLYPH_BBOX_SUBPIXELS    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
  /*    is another name for this constant.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
  /*    If the font is tricky and the glyph has been loaded with           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
  /*    @FT_LOAD_NO_SCALE, the resulting CBox is meaningless.  To get      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
  /*    reasonable values for the CBox it is necessary to load the glyph   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
  /*    at a large ppem value (so that the hinting instructions can        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
  /*    properly shift and scale the subglyphs), then extracting the CBox  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
  /*    which can be eventually converted back to font units.              */
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
  /*    Note that the maximum coordinates are exclusive, which means that  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
  /*    one can compute the width and height of the glyph image (be it in  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
  /*    integer or 26.6 pixels) as:                                        */
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
  /*      width  = bbox.xMax - bbox.xMin;                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
  /*      height = bbox.yMax - bbox.yMin;                                  */
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
  /*    Note also that for 26.6 coordinates, if `bbox_mode' is set to      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
  /*    @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
  /*    which corresponds to:                                              */
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
  /*      bbox.xMin = FLOOR(bbox.xMin);                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
  /*      bbox.yMin = FLOOR(bbox.yMin);                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
  /*      bbox.xMax = CEILING(bbox.xMax);                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
  /*      bbox.yMax = CEILING(bbox.yMax);                                  */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
  /*    To get the bbox in pixel coordinates, set `bbox_mode' to           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
  /*    @FT_GLYPH_BBOX_TRUNCATE.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
  /*    To get the bbox in grid-fitted pixel coordinates, set `bbox_mode'  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
  /*    to @FT_GLYPH_BBOX_PIXELS.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
  FT_Glyph_Get_CBox( FT_Glyph  glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
                     FT_UInt   bbox_mode,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
                     FT_BBox  *acbox );
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
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
  /*    FT_Glyph_To_Bitmap                                                 */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
  /*    Convert a given glyph object to a bitmap glyph object.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
  /*    the_glyph   :: A pointer to a handle to the target glyph.          */
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
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
  /*    render_mode :: An enumeration that describes how the data is       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
  /*                   rendered.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
  /*    origin      :: A pointer to a vector used to translate the glyph   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
  /*                   image before rendering.  Can be~0 (if no            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
  /*                   translation).  The origin is expressed in           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
  /*                   26.6 pixels.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
  /*    destroy     :: A boolean that indicates that the original glyph    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
  /*                   image should be destroyed by this function.  It is  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
  /*                   never destroyed in case of error.                   */
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
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
  /*    FreeType error code.  0~means success.                             */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
  /*    This function does nothing if the glyph format isn't scalable.     */
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
  /*    The glyph image is translated with the `origin' vector before      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
  /*    rendering.                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
  /*    The first parameter is a pointer to an @FT_Glyph handle, that will */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
  /*    be _replaced_ by this function (with newly allocated data).        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
  /*    Typically, you would use (omitting error handling):                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
  /*      {                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
  /*        FT_Glyph        glyph;                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
  /*        FT_BitmapGlyph  glyph_bitmap;                                  */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
  /*        // load glyph                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     */
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
  /*        // extract glyph image                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
  /*        error = FT_Get_Glyph( face->glyph, &glyph );                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
  /*        // convert to a bitmap (default render mode + destroying old)  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
  /*        if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
  /*        {                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
  /*          error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
  /*                                      0, 1 );                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
  /*          if ( error ) // `glyph' unchanged                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
  /*            ...                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
  /*        }                                                              */
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
  /*        // access bitmap content by typecasting                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
  /*        glyph_bitmap = (FT_BitmapGlyph)glyph;                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
  /*        // do funny stuff with it, like blitting/drawing               */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
  /*        // discard glyph image (bitmap or not)                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
  /*        FT_Done_Glyph( glyph );                                        */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
  /*    Here another example, again without error handling:                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
  /*                                                                       */
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
  /*      {                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
  /*        FT_Glyph  glyphs[MAX_GLYPHS]                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
  /*                                                                       */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
  /*          error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
  /*                  FT_Get_Glyph ( face->glyph, &glyph[idx] );           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
  /*                                                                       */
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
  /*        {                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
  /*          FT_Glyph  bitmap = glyphs[idx];                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
  /*          ...                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
  /*          // after this call, `bitmap' no longer points into           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
  /*          // the `glyphs' array (and the old value isn't destroyed)    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
  /*          FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 );    */
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
  /*          ...                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
  /*          FT_Done_Glyph( bitmap );                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
  /*        }                                                              */
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
  /*        ...                                                            */
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
  /*        for ( idx = 0; i < MAX_GLYPHS; i++ )                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
  /*          FT_Done_Glyph( glyphs[idx] );                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
  /*      }                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
  FT_Glyph_To_Bitmap( FT_Glyph*       the_glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
                      FT_Render_Mode  render_mode,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
                      FT_Vector*      origin,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
                      FT_Bool         destroy );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
  /*    FT_Done_Glyph                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
  /*    Destroy a given glyph.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
  /*    glyph :: A handle to the target glyph object.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
  FT_Done_Glyph( FT_Glyph  glyph );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
  /* other helpful functions */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
  /*    computations                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
  /*    FT_Matrix_Multiply                                                 */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
  /*    Perform the matrix operation `b = a*b'.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
  /*    a :: A pointer to matrix `a'.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
  /*    b :: A pointer to matrix `b'.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
  /*    The result is undefined if either `a' or `b' is zero.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
  FT_Matrix_Multiply( const FT_Matrix*  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
                      FT_Matrix*        b );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   590
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
  /*    FT_Matrix_Invert                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   594
  /*    Invert a 2x2 matrix.  Return an error if it can't be inverted.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   595
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   596
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   597
  /*    matrix :: A pointer to the target matrix.  Remains untouched in    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   598
  /*              case of error.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   599
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   600
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   601
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   602
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   603
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   604
  FT_Matrix_Invert( FT_Matrix*  matrix );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   605
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
  /* */
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
FT_END_HEADER
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
#endif /* __FTGLYPH_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   613
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
/* END */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   616
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   617
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   618
/* Local Variables: */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   619
/* coding: utf-8    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   620
/* End:             */