misc/libfreetype/include/freetype/freetype.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
/*  freetype.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 high-level API and common types (specification only).       */
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-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
#ifndef FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#error "`ft2build.h' hasn't been included yet!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
#error "Please always use macros to include FreeType header files."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#error "Example:"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#error "  #include <ft2build.h>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
#error "  #include FT_FREETYPE_H"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#ifndef __FREETYPE_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#define __FREETYPE_H__
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
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
#include FT_CONFIG_CONFIG_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
#include FT_ERRORS_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
#include FT_TYPES_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /*    user_allocation                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /*    User allocation                                                    */
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
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /*    How client applications should allocate FreeType data structures.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /*    FreeType assumes that structures allocated by the user and passed  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /*    as arguments are zeroed out except for the actual data.  In other  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /*    words, it is recommended to use `calloc' (or variants of it)       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /*    instead of `malloc' for allocation.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /*************************************************************************/
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
  /*                        B A S I C   T Y P E S                          */
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
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
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  /*    base_interface                                                     */
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
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  /*    Base Interface                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
  /*    The FreeType~2 base font interface.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  /*    This section describes the public high-level API of FreeType~2.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  /* <Order>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  /*    FT_Library                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  /*    FT_Face                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  /*    FT_Size                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /*    FT_GlyphSlot                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /*    FT_CharMap                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  /*    FT_Encoding                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  /*    FT_FaceRec                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /*    FT_FACE_FLAG_SCALABLE                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  /*    FT_FACE_FLAG_FIXED_SIZES                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
  /*    FT_FACE_FLAG_FIXED_WIDTH                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
  /*    FT_FACE_FLAG_HORIZONTAL                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
  /*    FT_FACE_FLAG_VERTICAL                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
  /*    FT_FACE_FLAG_SFNT                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  /*    FT_FACE_FLAG_KERNING                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  /*    FT_FACE_FLAG_FAST_GLYPHS                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  /*    FT_FACE_FLAG_HINTER                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  /*    FT_STYLE_FLAG_BOLD                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
  /*    FT_STYLE_FLAG_ITALIC                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  /*    FT_SizeRec                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
  /*    FT_Size_Metrics                                                    */
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_GlyphSlotRec                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  /*    FT_Glyph_Metrics                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  /*    FT_SubGlyph                                                        */
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
  /*    FT_Bitmap_Size                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  /*    FT_Init_FreeType                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
  /*    FT_Done_FreeType                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /*    FT_New_Face                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*    FT_Done_Face                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /*    FT_New_Memory_Face                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*    FT_Open_Face                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /*    FT_Open_Args                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  /*    FT_Parameter                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /*    FT_Attach_File                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*    FT_Attach_Stream                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*    FT_Set_Char_Size                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /*    FT_Set_Pixel_Sizes                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /*    FT_Request_Size                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /*    FT_Select_Size                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*    FT_Size_Request_Type                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /*    FT_Size_Request                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*    FT_Set_Transform                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*    FT_Load_Glyph                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  /*    FT_Get_Char_Index                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /*    FT_Get_Name_Index                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*    FT_Load_Char                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /*    FT_OPEN_MEMORY                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*    FT_OPEN_STREAM                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*    FT_OPEN_PATHNAME                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  /*    FT_OPEN_DRIVER                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  /*    FT_OPEN_PARAMS                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  /*    FT_LOAD_DEFAULT                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
  /*    FT_LOAD_RENDER                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
  /*    FT_LOAD_MONOCHROME                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
  /*    FT_LOAD_LINEAR_DESIGN                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  /*    FT_LOAD_NO_SCALE                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
  /*    FT_LOAD_NO_HINTING                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
  /*    FT_LOAD_NO_BITMAP                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
  /*    FT_LOAD_CROP_BITMAP                                                */
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
  /*    FT_LOAD_VERTICAL_LAYOUT                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
  /*    FT_LOAD_IGNORE_TRANSFORM                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
  /*    FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
  /*    FT_LOAD_FORCE_AUTOHINT                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
  /*    FT_LOAD_NO_RECURSE                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  /*    FT_LOAD_PEDANTIC                                                   */
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_LOAD_TARGET_NORMAL                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
  /*    FT_LOAD_TARGET_LIGHT                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
  /*    FT_LOAD_TARGET_MONO                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
  /*    FT_LOAD_TARGET_LCD                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  /*    FT_LOAD_TARGET_LCD_V                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
  /*    FT_Render_Glyph                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
  /*    FT_Render_Mode                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
  /*    FT_Get_Kerning                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
  /*    FT_Kerning_Mode                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
  /*    FT_Get_Track_Kerning                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
  /*    FT_Get_Glyph_Name                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
  /*    FT_Get_Postscript_Name                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
  /*    FT_CharMapRec                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
  /*    FT_Select_Charmap                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
  /*    FT_Set_Charmap                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
  /*    FT_Get_Charmap_Index                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
  /*    FT_FSTYPE_EDITABLE_EMBEDDING                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
  /*    FT_FSTYPE_NO_SUBSETTING                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
  /*    FT_Get_FSType_Flags                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
  /*    FT_Glyph_Metrics                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
  /*    A structure used to model the metrics of a single glyph.  The      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
  /*    values are expressed in 26.6 fractional pixel format; if the flag  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
  /*    @FT_LOAD_NO_SCALE has been used while loading the glyph, values    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
  /*    are expressed in font units instead.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
  /*    width ::                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
  /*      The glyph's width.                                               */
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
  /*    height ::                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
  /*      The glyph's height.                                              */
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
  /*    horiBearingX ::                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
  /*      Left side bearing for horizontal layout.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
  /*    horiBearingY ::                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
  /*      Top side bearing for horizontal layout.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
  /*    horiAdvance ::                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
  /*      Advance width for horizontal layout.                             */
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
  /*    vertBearingX ::                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
  /*      Left side bearing for vertical layout.                           */
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
  /*    vertBearingY ::                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
  /*      Top side bearing for vertical layout.                            */
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
  /*    vertAdvance ::                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
  /*      Advance height for vertical layout.                              */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
  /*    If not disabled with @FT_LOAD_NO_HINTING, the values represent     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
  /*    dimensions of the hinted glyph (in case hinting is applicable).    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
  typedef struct  FT_Glyph_Metrics_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
    FT_Pos  width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
    FT_Pos  height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
    FT_Pos  horiBearingX;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
    FT_Pos  horiBearingY;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
    FT_Pos  horiAdvance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
    FT_Pos  vertBearingX;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
    FT_Pos  vertBearingY;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
    FT_Pos  vertAdvance;
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
  } FT_Glyph_Metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
  /*    FT_Bitmap_Size                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
  /*    This structure models the metrics of a bitmap strike (i.e., a set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
  /*    of glyphs for a given point size and resolution) in a bitmap font. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
  /*    It is used for the `available_sizes' field of @FT_Face.            */
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
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  /*    height :: The vertical distance, in pixels, between two            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  /*              consecutive baselines.  It is always positive.           */
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
  /*    width  :: The average width, in pixels, of all glyphs in the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
  /*              strike.                                                  */
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
  /*    size   :: The nominal size of the strike in 26.6 fractional        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
  /*              points.  This field is not very useful.                  */
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
  /*    x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
  /*              pixels.                                                  */
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
  /*    y_ppem :: The vertical ppem (nominal height) in 26.6 fractional    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
  /*              pixels.                                                  */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
  /*    Windows FNT:                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
  /*      The nominal size given in a FNT font is not reliable.  Thus when */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
  /*      the driver finds it incorrect, it sets `size' to some calculated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
  /*      values and sets `x_ppem' and `y_ppem' to the pixel width and     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
  /*      height given in the font, respectively.                          */
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
  /*    TrueType embedded bitmaps:                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  /*      `size', `width', and `height' values are not contained in the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
  /*      bitmap strike itself.  They are computed from the global font    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
  /*      parameters.                                                      */
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
  typedef struct  FT_Bitmap_Size_
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
    FT_Short  height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
    FT_Short  width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
    FT_Pos    size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
    FT_Pos    x_ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
    FT_Pos    y_ppem;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
  } FT_Bitmap_Size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
  /*************************************************************************/
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
  /*                     O B J E C T   C L A S S E S                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
  /*    FT_Library                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
  /*    A handle to a FreeType library instance.  Each `library' is        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
  /*    completely independent from the others; it is the `root' of a set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
  /*    of objects like fonts, faces, sizes, etc.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
  /*    It also embeds a memory manager (see @FT_Memory), as well as a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
  /*    scan-line converter object (see @FT_Raster).                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
  /*    For multi-threading applications each thread should have its own   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
  /*    FT_Library object.                                                 */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
  /*    Library objects are normally created by @FT_Init_FreeType, and     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
  /*    destroyed with @FT_Done_FreeType.                                  */
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
  typedef struct FT_LibraryRec_  *FT_Library;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
  /*    FT_Module                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
  /*    A handle to a given FreeType module object.  Each module can be a  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
  /*    font driver, a renderer, or anything else that provides services   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
  /*    to the formers.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
  typedef struct FT_ModuleRec_*  FT_Module;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
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
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
  /*    FT_Driver                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
  /*    A handle to a given FreeType font driver object.  Each font driver */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
  /*    is a special module capable of creating faces from font files.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
  typedef struct FT_DriverRec_*  FT_Driver;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
  /*************************************************************************/
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
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
  /*    FT_Renderer                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
  /*    A handle to a given FreeType renderer.  A renderer is a special    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
  /*    module in charge of converting a glyph image to a bitmap, when     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
  /*    necessary.  Each renderer supports a given glyph image format, and */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
  /*    one or more target surface depths.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
  typedef struct FT_RendererRec_*  FT_Renderer;
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
  /*    FT_Face                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
  /*    A handle to a given typographic face object.  A face object models */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
  /*    a given typeface, in a given style.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
  /*    as one or more @FT_Size objects.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
  /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
  /*    a given filepathname or a custom input stream.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
  /* <Also>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
  /*    See @FT_FaceRec for the publicly accessible fields of a given face */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
  /*    object.                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
  typedef struct FT_FaceRec_*  FT_Face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
  /*************************************************************************/
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
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
  /*    FT_Size                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
  /*    A handle to an object used to model a face scaled to a given       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
  /*    character size.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
  /*    functions like @FT_Load_Glyph to determine the scaling             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
  /*    transformation which is used to load and hint glyphs and metrics.  */
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
  /*    You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes,                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
  /*    @FT_Request_Size or even @FT_Select_Size to change the content     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
  /*    (i.e., the scaling values) of the active @FT_Size.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
  /*    You can use @FT_New_Size to create additional size objects for a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
  /*    given @FT_Face, but they won't be used by other functions until    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
  /*    you activate it through @FT_Activate_Size.  Only one size can be   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
  /*    activated at any given time per face.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
  /* <Also>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
  /*    See @FT_SizeRec for the publicly accessible fields of a given size */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
  /*    object.                                                            */
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
  typedef struct FT_SizeRec_*  FT_Size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
  /*    FT_GlyphSlot                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
  /*    A handle to a given `glyph slot'.  A slot is a container where it  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
  /*    is possible to load any of the glyphs contained in its parent      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
  /*    face.                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
  /*    In other words, each time you call @FT_Load_Glyph or               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
  /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
  /*    i.e., the glyph's metrics, its image (bitmap or outline), and      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
  /*    other control information.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
  /* <Also>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
  /*    See @FT_GlyphSlotRec for the publicly accessible glyph fields.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
  /*    FT_CharMap                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
  /*    A handle to a given character map.  A charmap is used to translate */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
  /*    character codes in a given encoding into glyph indexes for its     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
  /*    parent's face.  Some font formats may provide several charmaps per */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
  /*    font.                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
  /*    Each face object owns zero or more charmaps, but only one of them  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
  /*    can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char.   */
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
  /*    The list of available charmaps in a face is available through the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
  /*    `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec.   */
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
  /*    The currently active charmap is available as `face->charmap'.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
  /*    You should call @FT_Set_Charmap to change it.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
  /*    When a new face is created (either through @FT_New_Face or         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
  /*    @FT_Open_Face), the library looks for a Unicode charmap within     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
  /*    the list and automatically activates it.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
  /* <Also>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
  /*    See @FT_CharMapRec for the publicly accessible fields of a given   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
  /*    character map.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
  typedef struct FT_CharMapRec_*  FT_CharMap;
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
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
  /* <Macro>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
  /*    FT_ENC_TAG                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
  /*    This macro converts four-letter tags into an unsigned long.  It is */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
  /*    used to define `encoding' identifiers (see @FT_Encoding).          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
  /*    should redefine this macro in case of problems to something like   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
  /*    this:                                                              */
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
  /*      #define FT_ENC_TAG( value, a, b, c, d )  value                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
  /*    }                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
  /*    to get a simple enumeration without assigning special numbers.     */
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
#ifndef FT_ENC_TAG
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
#define FT_ENC_TAG( value, a, b, c, d )         \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
          value = ( ( (FT_UInt32)(a) << 24 ) |  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
                    ( (FT_UInt32)(b) << 16 ) |  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
                    ( (FT_UInt32)(c) <<  8 ) |  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
                      (FT_UInt32)(d)         )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
#endif /* FT_ENC_TAG */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
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
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
  /*    FT_Encoding                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
  /*    An enumeration used to specify character sets supported by         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
  /*    charmaps.  Used in the @FT_Select_Charmap API function.            */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
  /*    Despite the name, this enumeration lists specific character        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
  /*    repertories (i.e., charsets), and not text encoding methods (e.g., */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
  /*    UTF-8, UTF-16, etc.).                                              */
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
  /*    Other encodings might be defined in the future.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
  /*    FT_ENCODING_NONE ::                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
  /*      The encoding value~0 is reserved.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
  /*    FT_ENCODING_UNICODE ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
  /*      Corresponds to the Unicode character set.  This value covers     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
  /*      all versions of the Unicode repertoire, including ASCII and      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
  /*      Latin-1.  Most fonts include a Unicode charmap, but not all      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
  /*      of them.                                                         */
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
  /*      For example, if you want to access Unicode value U+1F028 (and    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
  /*      the font contains it), use value 0x1F028 as the input value for  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
  /*      @FT_Get_Char_Index.                                              */
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
  /*    FT_ENCODING_MS_SYMBOL ::                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
  /*      Corresponds to the Microsoft Symbol encoding, used to encode     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
  /*      mathematical symbols in the 32..255 character code range.  For   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
  /*      more information, see `http://www.ceviz.net/symbol.htm'.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
  /*    FT_ENCODING_SJIS ::                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
  /*      Corresponds to Japanese SJIS encoding.  More info at             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
  /*      at `http://langsupport.japanreference.com/encoding.shtml'.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
  /*      See note on multi-byte encodings below.                          */
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
  /*    FT_ENCODING_GB2312 ::                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
  /*      Corresponds to an encoding system for Simplified Chinese as used */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
  /*      used in mainland China.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
  /*    FT_ENCODING_BIG5 ::                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
  /*      Corresponds to an encoding system for Traditional Chinese as     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
  /*      used in Taiwan and Hong Kong.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
  /*    FT_ENCODING_WANSUNG ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
  /*      Corresponds to the Korean encoding system known as Wansung.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
  /*      For more information see                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   565
  /*      `http://www.microsoft.com/typography/unicode/949.txt'.           */
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
  /*    FT_ENCODING_JOHAB ::                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
  /*      The Korean standard character set (KS~C 5601-1992), which        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
  /*      corresponds to MS Windows code page 1361.  This character set    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
  /*      includes all possible Hangeul character combinations.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
  /*    FT_ENCODING_ADOBE_LATIN_1 ::                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
  /*      Corresponds to a Latin-1 encoding as defined in a Type~1         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
  /*      PostScript font.  It is limited to 256 character codes.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
  /*    FT_ENCODING_ADOBE_STANDARD ::                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
  /*      Corresponds to the Adobe Standard encoding, as found in Type~1,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
  /*      codes.                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
  /*    FT_ENCODING_ADOBE_EXPERT ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
  /*      Corresponds to the Adobe Expert encoding, as found in Type~1,    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
  /*      codes.                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
  /*    FT_ENCODING_ADOBE_CUSTOM ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
  /*      Corresponds to a custom encoding, as found in Type~1, CFF, and   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   588
  /*      OpenType/CFF fonts.  It is limited to 256 character codes.       */
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
  /*    FT_ENCODING_APPLE_ROMAN ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
  /*      Corresponds to the 8-bit Apple roman encoding.  Many TrueType    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
  /*      and OpenType fonts contain a charmap for this encoding, since    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
  /*      older versions of Mac OS are able to use it.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   594
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   595
  /*    FT_ENCODING_OLD_LATIN_2 ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   596
  /*      This value is deprecated and was never used nor reported by      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   597
  /*      FreeType.  Don't use or test for it.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   598
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   599
  /*    FT_ENCODING_MS_SJIS ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   600
  /*      Same as FT_ENCODING_SJIS.  Deprecated.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   601
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   602
  /*    FT_ENCODING_MS_GB2312 ::                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   603
  /*      Same as FT_ENCODING_GB2312.  Deprecated.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   604
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   605
  /*    FT_ENCODING_MS_BIG5 ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   606
  /*      Same as FT_ENCODING_BIG5.  Deprecated.                           */
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
  /*    FT_ENCODING_MS_WANSUNG ::                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   609
  /*      Same as FT_ENCODING_WANSUNG.  Deprecated.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   610
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   611
  /*    FT_ENCODING_MS_JOHAB ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   612
  /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   615
  /*    By default, FreeType automatically synthesizes a Unicode charmap   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   616
  /*    for PostScript fonts, using their glyph names dictionaries.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   617
  /*    However, it also reports the encodings defined explicitly in the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   618
  /*    font file, for the cases when they are needed, with the Adobe      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   619
  /*    values as well.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   620
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   621
  /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   622
  /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   623
  /*    FT_ENCODING_UNICODE).  Use @FT_Get_BDF_Charset_ID to find out      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   624
  /*    which encoding is really present.  If, for example, the            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   625
  /*    `cs_registry' field is `KOI8' and the `cs_encoding' field is `R',  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   626
  /*    the font is encoded in KOI8-R.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   627
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   628
  /*    FT_ENCODING_NONE is always set (with a single exception) by the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   629
  /*    winfonts driver.  Use @FT_Get_WinFNT_Header and examine the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   630
  /*    `charset' field of the @FT_WinFNT_HeaderRec structure to find out  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   631
  /*    which encoding is really present.  For example,                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   632
  /*    @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   633
  /*    Russian).                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   634
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   635
  /*    FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   636
  /*    and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   637
  /*    FT_ENCODING_APPLE_ROMAN).                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   638
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   639
  /*    If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   640
  /*    @FT_Get_CMap_Language_ID  to query the Mac language ID which may   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   641
  /*    be needed to be able to distinguish Apple encoding variants.  See  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   642
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   643
  /*      http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   644
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   645
  /*    to get an idea how to do that.  Basically, if the language ID      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   646
  /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   647
  /*    Then examine `encoding_id'.  If, for example, `encoding_id' is     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   648
  /*    @TT_MAC_ID_ROMAN and the language ID (minus~1) is                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   649
  /*    `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   650
  /*    @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   651
  /*    variant the Arabic encoding.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   652
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   653
  typedef enum  FT_Encoding_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   654
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   655
    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   656
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   657
    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   658
    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   659
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   660
    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   661
    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   662
    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   663
    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   664
    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   665
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   666
    /* for backwards compatibility */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   667
    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   668
    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   669
    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   670
    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   671
    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   672
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   673
    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   674
    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   675
    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   676
    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   677
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   678
    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   679
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   680
    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   681
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   682
  } FT_Encoding;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   683
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   684
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   685
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   686
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   687
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   688
  /*    ft_encoding_xxx                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   689
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   690
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   691
  /*    These constants are deprecated; use the corresponding @FT_Encoding */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   692
  /*    values instead.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   693
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   694
#define ft_encoding_none            FT_ENCODING_NONE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   695
#define ft_encoding_unicode         FT_ENCODING_UNICODE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   696
#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   697
#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   698
#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   699
#define ft_encoding_sjis            FT_ENCODING_SJIS
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   700
#define ft_encoding_gb2312          FT_ENCODING_GB2312
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   701
#define ft_encoding_big5            FT_ENCODING_BIG5
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   702
#define ft_encoding_wansung         FT_ENCODING_WANSUNG
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   703
#define ft_encoding_johab           FT_ENCODING_JOHAB
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   704
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   705
#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   706
#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   707
#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   708
#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   709
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   710
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   711
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   712
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   713
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   714
  /*    FT_CharMapRec                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   715
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   716
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   717
  /*    The base charmap structure.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   718
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   719
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   720
  /*    face        :: A handle to the parent face object.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   721
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   722
  /*    encoding    :: An @FT_Encoding tag identifying the charmap.  Use   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   723
  /*                   this with @FT_Select_Charmap.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   724
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   725
  /*    platform_id :: An ID number describing the platform for the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   726
  /*                   following encoding ID.  This comes directly from    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   727
  /*                   the TrueType specification and should be emulated   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   728
  /*                   for other formats.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   729
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   730
  /*    encoding_id :: A platform specific encoding number.  This also     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   731
  /*                   comes from the TrueType specification and should be */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   732
  /*                   emulated similarly.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   733
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   734
  typedef struct  FT_CharMapRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   735
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   736
    FT_Face      face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   737
    FT_Encoding  encoding;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   738
    FT_UShort    platform_id;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   739
    FT_UShort    encoding_id;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   740
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   741
  } FT_CharMapRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   742
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   743
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   744
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   745
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   746
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   747
  /*                 B A S E   O B J E C T   C L A S S E S                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   748
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   749
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   750
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   751
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   752
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   753
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   754
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   755
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   756
  /*    FT_Face_Internal                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   757
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   758
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   759
  /*    An opaque handle to an `FT_Face_InternalRec' structure, used to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   760
  /*    model private data of a given @FT_Face object.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   761
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   762
  /*    This structure might change between releases of FreeType~2 and is  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   763
  /*    not generally available to client applications.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   764
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   765
  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   766
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   767
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   768
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   769
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   770
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   771
  /*    FT_FaceRec                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   772
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   773
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   774
  /*    FreeType root face class structure.  A face object models a        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   775
  /*    typeface in a font file.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   776
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   777
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   778
  /*    num_faces           :: The number of faces in the font file.  Some */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   779
  /*                           font formats can have multiple faces in     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   780
  /*                           a font file.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   781
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   782
  /*    face_index          :: The index of the face in the font file.  It */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   783
  /*                           is set to~0 if there is only one face in    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   784
  /*                           the font file.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   785
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   786
  /*    face_flags          :: A set of bit flags that give important      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   787
  /*                           information about the face; see             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   788
  /*                           @FT_FACE_FLAG_XXX for the details.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   789
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   790
  /*    style_flags         :: A set of bit flags indicating the style of  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   791
  /*                           the face; see @FT_STYLE_FLAG_XXX for the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   792
  /*                           details.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   793
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   794
  /*    num_glyphs          :: The number of glyphs in the face.  If the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   795
  /*                           face is scalable and has sbits (see         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   796
  /*                           `num_fixed_sizes'), it is set to the number */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   797
  /*                           of outline glyphs.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   798
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   799
  /*                           For CID-keyed fonts, this value gives the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   800
  /*                           highest CID used in the font.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   801
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   802
  /*    family_name         :: The face's family name.  This is an ASCII   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   803
  /*                           string, usually in English, which describes */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   804
  /*                           the typeface's family (like `Times New      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   805
  /*                           Roman', `Bodoni', `Garamond', etc).  This   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   806
  /*                           is a least common denominator used to list  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   807
  /*                           fonts.  Some formats (TrueType & OpenType)  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   808
  /*                           provide localized and Unicode versions of   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   809
  /*                           this string.  Applications should use the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   810
  /*                           format specific interface to access them.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   811
  /*                           Can be NULL (e.g., in fonts embedded in a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   812
  /*                           PDF file).                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   813
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   814
  /*    style_name          :: The face's style name.  This is an ASCII    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   815
  /*                           string, usually in English, which describes */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   816
  /*                           the typeface's style (like `Italic',        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   817
  /*                           `Bold', `Condensed', etc).  Not all font    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   818
  /*                           formats provide a style name, so this field */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   819
  /*                           is optional, and can be set to NULL.  As    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   820
  /*                           for `family_name', some formats provide     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   821
  /*                           localized and Unicode versions of this      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   822
  /*                           string.  Applications should use the format */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   823
  /*                           specific interface to access them.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   824
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   825
  /*    num_fixed_sizes     :: The number of bitmap strikes in the face.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   826
  /*                           Even if the face is scalable, there might   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   827
  /*                           still be bitmap strikes, which are called   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   828
  /*                           `sbits' in that case.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   829
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   830
  /*    available_sizes     :: An array of @FT_Bitmap_Size for all bitmap  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   831
  /*                           strikes in the face.  It is set to NULL if  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   832
  /*                           there is no bitmap strike.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   833
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   834
  /*    num_charmaps        :: The number of charmaps in the face.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   835
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   836
  /*    charmaps            :: An array of the charmaps of the face.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   837
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   838
  /*    generic             :: A field reserved for client uses.  See the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   839
  /*                           @FT_Generic type description.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   840
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   841
  /*    bbox                :: The font bounding box.  Coordinates are     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   842
  /*                           expressed in font units (see                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   843
  /*                           `units_per_EM').  The box is large enough   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   844
  /*                           to contain any glyph from the font.  Thus,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   845
  /*                           `bbox.yMax' can be seen as the `maximal     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   846
  /*                           ascender', and `bbox.yMin' as the `minimal  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   847
  /*                           descender'.  Only relevant for scalable     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   848
  /*                           formats.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   849
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   850
  /*                           Note that the bounding box might be off by  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   851
  /*                           (at least) one pixel for hinted fonts.  See */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   852
  /*                           @FT_Size_Metrics for further discussion.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   853
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   854
  /*    units_per_EM        :: The number of font units per EM square for  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   855
  /*                           this face.  This is typically 2048 for      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   856
  /*                           TrueType fonts, and 1000 for Type~1 fonts.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   857
  /*                           Only relevant for scalable formats.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   858
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   859
  /*    ascender            :: The typographic ascender of the face,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   860
  /*                           expressed in font units.  For font formats  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   861
  /*                           not having this information, it is set to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   862
  /*                           `bbox.yMax'.  Only relevant for scalable    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   863
  /*                           formats.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   864
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   865
  /*    descender           :: The typographic descender of the face,      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   866
  /*                           expressed in font units.  For font formats  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   867
  /*                           not having this information, it is set to   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   868
  /*                           `bbox.yMin'.  Note that this field is       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   869
  /*                           usually negative.  Only relevant for        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   870
  /*                           scalable formats.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   871
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   872
  /*    height              :: The height is the vertical distance         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   873
  /*                           between two consecutive baselines,          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   874
  /*                           expressed in font units.  It is always      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   875
  /*                           positive.  Only relevant for scalable       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   876
  /*                           formats.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   877
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   878
  /*    max_advance_width   :: The maximal advance width, in font units,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   879
  /*                           for all glyphs in this face.  This can be   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   880
  /*                           used to make word wrapping computations     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   881
  /*                           faster.  Only relevant for scalable         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   882
  /*                           formats.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   883
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   884
  /*    max_advance_height  :: The maximal advance height, in font units,  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   885
  /*                           for all glyphs in this face.  This is only  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   886
  /*                           relevant for vertical layouts, and is set   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   887
  /*                           to `height' for fonts that do not provide   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   888
  /*                           vertical metrics.  Only relevant for        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   889
  /*                           scalable formats.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   890
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   891
  /*    underline_position  :: The position, in font units, of the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   892
  /*                           underline line for this face.  It is the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   893
  /*                           center of the underlining stem.  Only       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   894
  /*                           relevant for scalable formats.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   895
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   896
  /*    underline_thickness :: The thickness, in font units, of the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   897
  /*                           underline for this face.  Only relevant for */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   898
  /*                           scalable formats.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   899
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   900
  /*    glyph               :: The face's associated glyph slot(s).        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   901
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   902
  /*    size                :: The current active size for this face.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   903
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   904
  /*    charmap             :: The current active charmap for this face.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   905
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   906
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   907
  /*    Fields may be changed after a call to @FT_Attach_File or           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   908
  /*    @FT_Attach_Stream.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   909
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   910
  typedef struct  FT_FaceRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   911
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   912
    FT_Long           num_faces;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   913
    FT_Long           face_index;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   914
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   915
    FT_Long           face_flags;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   916
    FT_Long           style_flags;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   917
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   918
    FT_Long           num_glyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   919
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   920
    FT_String*        family_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   921
    FT_String*        style_name;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   922
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   923
    FT_Int            num_fixed_sizes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   924
    FT_Bitmap_Size*   available_sizes;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   925
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   926
    FT_Int            num_charmaps;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   927
    FT_CharMap*       charmaps;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   928
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   929
    FT_Generic        generic;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   930
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   931
    /*# The following member variables (down to `underline_thickness') */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   932
    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   933
    /*# for bitmap fonts.                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   934
    FT_BBox           bbox;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   935
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   936
    FT_UShort         units_per_EM;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   937
    FT_Short          ascender;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   938
    FT_Short          descender;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   939
    FT_Short          height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   940
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   941
    FT_Short          max_advance_width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   942
    FT_Short          max_advance_height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   943
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   944
    FT_Short          underline_position;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   945
    FT_Short          underline_thickness;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   946
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   947
    FT_GlyphSlot      glyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   948
    FT_Size           size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   949
    FT_CharMap        charmap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   950
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   951
    /*@private begin */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   952
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   953
    FT_Driver         driver;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   954
    FT_Memory         memory;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   955
    FT_Stream         stream;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   956
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   957
    FT_ListRec        sizes_list;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   958
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   959
    FT_Generic        autohint;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   960
    void*             extensions;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   961
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   962
    FT_Face_Internal  internal;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   963
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   964
    /*@private end */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   965
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   966
  } FT_FaceRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   967
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   968
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   969
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   970
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   971
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   972
  /*    FT_FACE_FLAG_XXX                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   973
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   974
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   975
  /*    A list of bit flags used in the `face_flags' field of the          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   976
  /*    @FT_FaceRec structure.  They inform client applications of         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   977
  /*    properties of the corresponding face.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   978
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   979
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   980
  /*    FT_FACE_FLAG_SCALABLE ::                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   981
  /*      Indicates that the face contains outline glyphs.  This doesn't   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   982
  /*      prevent bitmap strikes, i.e., a face can have both this and      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   983
  /*      and @FT_FACE_FLAG_FIXED_SIZES set.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   984
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   985
  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   986
  /*      Indicates that the face contains bitmap strikes.  See also the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   987
  /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   988
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   989
  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   990
  /*      Indicates that the face contains fixed-width characters (like    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   991
  /*      Courier, Lucido, MonoType, etc.).                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   992
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   993
  /*    FT_FACE_FLAG_SFNT ::                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   994
  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   995
  /*      now, this means TrueType and OpenType.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   996
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   997
  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   998
  /*      Indicates that the face contains horizontal glyph metrics.  This */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   999
  /*      should be set for all common formats.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1000
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1001
  /*    FT_FACE_FLAG_VERTICAL ::                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1002
  /*      Indicates that the face contains vertical glyph metrics.  This   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1003
  /*      is only available in some formats, not all of them.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1004
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1005
  /*    FT_FACE_FLAG_KERNING ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1006
  /*      Indicates that the face contains kerning information.  If set,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1007
  /*      the kerning distance can be retrieved through the function       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1008
  /*      @FT_Get_Kerning.  Otherwise the function always return the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1009
  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1010
  /*      from the `GPOS' table (as present in some OpenType fonts).       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1011
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1012
  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1013
  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1014
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1015
  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1016
  /*      Indicates that the font contains multiple masters and is capable */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1017
  /*      of interpolating between them.  See the multiple-masters         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1018
  /*      specific API for details.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1019
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1020
  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1021
  /*      Indicates that the font contains glyph names that can be         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1022
  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1023
  /*      fonts contain broken glyph name tables.  Use the function        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1024
  /*      @FT_Has_PS_Glyph_Names when needed.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1025
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1026
  /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1027
  /*      Used internally by FreeType to indicate that a face's stream was */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1028
  /*      provided by the client application and should not be destroyed   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1029
  /*      when @FT_Done_Face is called.  Don't read or test this flag.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1030
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1031
  /*    FT_FACE_FLAG_HINTER ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1032
  /*      Set if the font driver has a hinting machine of its own.  For    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1033
  /*      example, with TrueType fonts, it makes sense to use data from    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1034
  /*      the SFNT `gasp' table only if the native TrueType hinting engine */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1035
  /*      (with the bytecode interpreter) is available and active.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1036
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1037
  /*    FT_FACE_FLAG_CID_KEYED ::                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1038
  /*      Set if the font is CID-keyed.  In that case, the font is not     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1039
  /*      accessed by glyph indices but by CID values.  For subsetted      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1040
  /*      CID-keyed fonts this has the consequence that not all index      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1041
  /*      values are a valid argument to FT_Load_Glyph.  Only the CID      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1042
  /*      values for which corresponding glyphs in the subsetted font      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1043
  /*      exist make FT_Load_Glyph return successfully; in all other cases */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1044
  /*      you get an `FT_Err_Invalid_Argument' error.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1045
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1046
  /*      Note that CID-keyed fonts which are in an SFNT wrapper don't     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1047
  /*      have this flag set since the glyphs are accessed in the normal   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1048
  /*      way (using contiguous indices); the `CID-ness' isn't visible to  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1049
  /*      the application.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1050
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1051
  /*    FT_FACE_FLAG_TRICKY ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1052
  /*      Set if the font is `tricky', this is, it always needs the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1053
  /*      font format's native hinting engine to get a reasonable result.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1054
  /*      A typical example is the Chinese font `mingli.ttf' which uses    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1055
  /*      TrueType bytecode instructions to move and scale all of its      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1056
  /*      subglyphs.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1057
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1058
  /*      It is not possible to autohint such fonts using                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1059
  /*      @FT_LOAD_FORCE_AUTOHINT; it will also ignore                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1060
  /*      @FT_LOAD_NO_HINTING.  You have to set both @FT_LOAD_NO_HINTING   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1061
  /*      and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1062
  /*      probably never want this except for demonstration purposes.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1063
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1064
  /*      Currently, there are six TrueType fonts in the list of tricky    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1065
  /*      fonts; they are hard-coded in file `ttobjs.c'.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1066
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1067
#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1068
#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1069
#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1070
#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1071
#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1072
#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1073
#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1074
#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1075
#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1076
#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1077
#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1078
#define FT_FACE_FLAG_HINTER            ( 1L << 11 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1079
#define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1080
#define FT_FACE_FLAG_TRICKY            ( 1L << 13 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1081
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1082
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1083
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1084
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1085
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1086
   *   FT_HAS_HORIZONTAL( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1087
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1088
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1089
   *   A macro that returns true whenever a face object contains
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1090
   *   horizontal metrics (this is true for all font formats though).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1091
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1092
   * @also:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1093
   *   @FT_HAS_VERTICAL can be used to check for vertical metrics.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1094
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1095
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1096
#define FT_HAS_HORIZONTAL( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1097
          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1098
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1099
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1100
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1101
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1102
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1103
   *   FT_HAS_VERTICAL( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1104
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1105
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1106
   *   A macro that returns true whenever a face object contains vertical
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1107
   *   metrics.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1108
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1109
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1110
#define FT_HAS_VERTICAL( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1111
          ( face->face_flags & FT_FACE_FLAG_VERTICAL )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1112
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1113
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1114
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1115
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1116
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1117
   *   FT_HAS_KERNING( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1118
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1119
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1120
   *   A macro that returns true whenever a face object contains kerning
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1121
   *   data that can be accessed with @FT_Get_Kerning.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1122
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1123
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1124
#define FT_HAS_KERNING( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1125
          ( face->face_flags & FT_FACE_FLAG_KERNING )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1126
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1127
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1128
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1129
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1130
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1131
   *   FT_IS_SCALABLE( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1132
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1133
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1134
   *   A macro that returns true whenever a face object contains a scalable
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1135
   *   font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1136
   *   and PFR font formats.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1137
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1138
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1139
#define FT_IS_SCALABLE( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1140
          ( face->face_flags & FT_FACE_FLAG_SCALABLE )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1141
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1142
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1143
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1144
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1145
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1146
   *   FT_IS_SFNT( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1147
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1148
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1149
   *   A macro that returns true whenever a face object contains a font
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1150
   *   whose format is based on the SFNT storage scheme.  This usually
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1151
   *   means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1152
   *   bitmap fonts.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1153
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1154
   *   If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1155
   *   @FT_TRUETYPE_TABLES_H are available.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1156
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1157
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1158
#define FT_IS_SFNT( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1159
          ( face->face_flags & FT_FACE_FLAG_SFNT )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1160
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1161
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1162
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1163
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1164
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1165
   *   FT_IS_FIXED_WIDTH( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1166
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1167
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1168
   *   A macro that returns true whenever a face object contains a font face
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1169
   *   that contains fixed-width (or `monospace', `fixed-pitch', etc.)
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1170
   *   glyphs.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1171
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1172
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1173
#define FT_IS_FIXED_WIDTH( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1174
          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1175
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1176
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1177
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1178
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1179
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1180
   *   FT_HAS_FIXED_SIZES( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1181
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1182
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1183
   *   A macro that returns true whenever a face object contains some
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1184
   *   embedded bitmaps.  See the `available_sizes' field of the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1185
   *   @FT_FaceRec structure.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1186
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1187
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1188
#define FT_HAS_FIXED_SIZES( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1189
          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1190
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1191
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1192
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1193
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1194
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1195
   *   FT_HAS_FAST_GLYPHS( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1196
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1197
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1198
   *   Deprecated.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1199
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1200
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1201
#define FT_HAS_FAST_GLYPHS( face )  0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1202
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1203
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1204
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1205
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1206
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1207
   *   FT_HAS_GLYPH_NAMES( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1208
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1209
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1210
   *   A macro that returns true whenever a face object contains some glyph
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1211
   *   names that can be accessed through @FT_Get_Glyph_Name.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1212
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1213
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1214
#define FT_HAS_GLYPH_NAMES( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1215
          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1216
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1217
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1218
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1219
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1220
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1221
   *   FT_HAS_MULTIPLE_MASTERS( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1222
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1223
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1224
   *   A macro that returns true whenever a face object contains some
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1225
   *   multiple masters.  The functions provided by @FT_MULTIPLE_MASTERS_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1226
   *   are then available to choose the exact design you want.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1227
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1228
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1229
#define FT_HAS_MULTIPLE_MASTERS( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1230
          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1231
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1232
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1233
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1234
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1235
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1236
   *   FT_IS_CID_KEYED( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1237
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1238
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1239
   *   A macro that returns true whenever a face object contains a CID-keyed
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1240
   *   font.  See the discussion of @FT_FACE_FLAG_CID_KEYED for more
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1241
   *   details.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1242
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1243
   *   If this macro is true, all functions defined in @FT_CID_H are
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1244
   *   available.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1245
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1246
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1247
#define FT_IS_CID_KEYED( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1248
          ( face->face_flags & FT_FACE_FLAG_CID_KEYED )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1249
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1250
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1251
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1252
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1253
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1254
   *   FT_IS_TRICKY( face )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1255
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1256
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1257
   *   A macro that returns true whenever a face represents a `tricky' font.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1258
   *   See the discussion of @FT_FACE_FLAG_TRICKY for more details.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1259
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1260
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1261
#define FT_IS_TRICKY( face ) \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1262
          ( face->face_flags & FT_FACE_FLAG_TRICKY )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1263
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1264
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1265
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1266
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1267
  /* <Const>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1268
  /*    FT_STYLE_FLAG_XXX                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1269
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1270
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1271
  /*    A list of bit-flags used to indicate the style of a given face.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1272
  /*    These are used in the `style_flags' field of @FT_FaceRec.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1273
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1274
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1275
  /*    FT_STYLE_FLAG_ITALIC ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1276
  /*      Indicates that a given face style is italic or oblique.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1277
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1278
  /*    FT_STYLE_FLAG_BOLD ::                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1279
  /*      Indicates that a given face is bold.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1280
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1281
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1282
  /*    The style information as provided by FreeType is very basic.  More */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1283
  /*    details are beyond the scope and should be done on a higher level  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1284
  /*    (for example, by analyzing various fields of the `OS/2' table in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1285
  /*    SFNT based fonts).                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1286
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1287
#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1288
#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1289
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1290
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1291
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1292
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1293
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1294
  /*    FT_Size_Internal                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1295
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1296
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1297
  /*    An opaque handle to an `FT_Size_InternalRec' structure, used to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1298
  /*    model private data of a given @FT_Size object.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1299
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1300
  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1301
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1302
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1303
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1304
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1305
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1306
  /*    FT_Size_Metrics                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1307
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1308
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1309
  /*    The size metrics structure gives the metrics of a size object.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1310
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1311
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1312
  /*    x_ppem       :: The width of the scaled EM square in pixels, hence */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1313
  /*                    the term `ppem' (pixels per EM).  It is also       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1314
  /*                    referred to as `nominal width'.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1315
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1316
  /*    y_ppem       :: The height of the scaled EM square in pixels,      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1317
  /*                    hence the term `ppem' (pixels per EM).  It is also */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1318
  /*                    referred to as `nominal height'.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1319
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1320
  /*    x_scale      :: A 16.16 fractional scaling value used to convert   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1321
  /*                    horizontal metrics from font units to 26.6         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1322
  /*                    fractional pixels.  Only relevant for scalable     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1323
  /*                    font formats.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1324
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1325
  /*    y_scale      :: A 16.16 fractional scaling value used to convert   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1326
  /*                    vertical metrics from font units to 26.6           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1327
  /*                    fractional pixels.  Only relevant for scalable     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1328
  /*                    font formats.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1329
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1330
  /*    ascender     :: The ascender in 26.6 fractional pixels.  See       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1331
  /*                    @FT_FaceRec for the details.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1332
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1333
  /*    descender    :: The descender in 26.6 fractional pixels.  See      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1334
  /*                    @FT_FaceRec for the details.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1335
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1336
  /*    height       :: The height in 26.6 fractional pixels.  See         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1337
  /*                    @FT_FaceRec for the details.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1338
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1339
  /*    max_advance  :: The maximal advance width in 26.6 fractional       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1340
  /*                    pixels.  See @FT_FaceRec for the details.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1341
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1342
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1343
  /*    The scaling values, if relevant, are determined first during a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1344
  /*    size changing operation.  The remaining fields are then set by the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1345
  /*    driver.  For scalable formats, they are usually set to scaled      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1346
  /*    values of the corresponding fields in @FT_FaceRec.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1347
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1348
  /*    Note that due to glyph hinting, these values might not be exact    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1349
  /*    for certain fonts.  Thus they must be treated as unreliable        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1350
  /*    with an error margin of at least one pixel!                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1351
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1352
  /*    Indeed, the only way to get the exact metrics is to render _all_   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1353
  /*    glyphs.  As this would be a definite performance hit, it is up to  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1354
  /*    client applications to perform such computations.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1355
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1356
  /*    The FT_Size_Metrics structure is valid for bitmap fonts also.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1357
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1358
  typedef struct  FT_Size_Metrics_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1359
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1360
    FT_UShort  x_ppem;      /* horizontal pixels per EM               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1361
    FT_UShort  y_ppem;      /* vertical pixels per EM                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1362
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1363
    FT_Fixed   x_scale;     /* scaling values used to convert font    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1364
    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1365
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1366
    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1367
    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1368
    FT_Pos     height;      /* text height in 26.6 frac. pixels       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1369
    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1370
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1371
  } FT_Size_Metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1372
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1373
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1374
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1375
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1376
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1377
  /*    FT_SizeRec                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1378
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1379
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1380
  /*    FreeType root size class structure.  A size object models a face   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1381
  /*    object at a given size.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1382
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1383
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1384
  /*    face    :: Handle to the parent face object.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1385
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1386
  /*    generic :: A typeless pointer, which is unused by the FreeType     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1387
  /*               library or any of its drivers.  It can be used by       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1388
  /*               client applications to link their own data to each size */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1389
  /*               object.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1390
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1391
  /*    metrics :: Metrics for this size object.  This field is read-only. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1392
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1393
  typedef struct  FT_SizeRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1394
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1395
    FT_Face           face;      /* parent face object              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1396
    FT_Generic        generic;   /* generic pointer for client uses */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1397
    FT_Size_Metrics   metrics;   /* size metrics                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1398
    FT_Size_Internal  internal;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1399
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1400
  } FT_SizeRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1401
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1402
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1403
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1404
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1405
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1406
  /*    FT_SubGlyph                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1407
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1408
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1409
  /*    The subglyph structure is an internal object used to describe      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1410
  /*    subglyphs (for example, in the case of composites).                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1411
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1412
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1413
  /*    The subglyph implementation is not part of the high-level API,     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1414
  /*    hence the forward structure declaration.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1415
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1416
  /*    You can however retrieve subglyph information with                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1417
  /*    @FT_Get_SubGlyph_Info.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1418
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1419
  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1420
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1421
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1422
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1423
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1424
  /* <Type>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1425
  /*    FT_Slot_Internal                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1426
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1427
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1428
  /*    An opaque handle to an `FT_Slot_InternalRec' structure, used to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1429
  /*    model private data of a given @FT_GlyphSlot object.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1430
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1431
  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1432
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1433
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1434
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1435
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1436
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1437
  /*    FT_GlyphSlotRec                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1438
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1439
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1440
  /*    FreeType root glyph slot class structure.  A glyph slot is a       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1441
  /*    container where individual glyphs can be loaded, be they in        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1442
  /*    outline or bitmap format.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1443
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1444
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1445
  /*    library           :: A handle to the FreeType library instance     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1446
  /*                         this slot belongs to.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1447
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1448
  /*    face              :: A handle to the parent face object.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1449
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1450
  /*    next              :: In some cases (like some font tools), several */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1451
  /*                         glyph slots per face object can be a good     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1452
  /*                         thing.  As this is rare, the glyph slots are  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1453
  /*                         listed through a direct, single-linked list   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1454
  /*                         using its `next' field.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1455
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1456
  /*    generic           :: A typeless pointer which is unused by the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1457
  /*                         FreeType library or any of its drivers.  It   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1458
  /*                         can be used by client applications to link    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1459
  /*                         their own data to each glyph slot object.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1460
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1461
  /*    metrics           :: The metrics of the last loaded glyph in the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1462
  /*                         slot.  The returned values depend on the last */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1463
  /*                         load flags (see the @FT_Load_Glyph API        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1464
  /*                         function) and can be expressed either in 26.6 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1465
  /*                         fractional pixels or font units.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1466
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1467
  /*                         Note that even when the glyph image is        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1468
  /*                         transformed, the metrics are not.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1469
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1470
  /*    linearHoriAdvance :: The advance width of the unhinted glyph.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1471
  /*                         Its value is expressed in 16.16 fractional    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1472
  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1473
  /*                         when loading the glyph.  This field can be    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1474
  /*                         important to perform correct WYSIWYG layout.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1475
  /*                         Only relevant for outline glyphs.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1476
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1477
  /*    linearVertAdvance :: The advance height of the unhinted glyph.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1478
  /*                         Its value is expressed in 16.16 fractional    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1479
  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1480
  /*                         when loading the glyph.  This field can be    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1481
  /*                         important to perform correct WYSIWYG layout.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1482
  /*                         Only relevant for outline glyphs.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1483
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1484
  /*    advance           :: This shorthand is, depending on               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1485
  /*                         @FT_LOAD_IGNORE_TRANSFORM, the transformed    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1486
  /*                         advance width for the glyph (in 26.6          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1487
  /*                         fractional pixel format).  As specified with  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1488
  /*                         @FT_LOAD_VERTICAL_LAYOUT, it uses either the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1489
  /*                         `horiAdvance' or the `vertAdvance' value of   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1490
  /*                         `metrics' field.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1491
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1492
  /*    format            :: This field indicates the format of the image  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1493
  /*                         contained in the glyph slot.  Typically       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1494
  /*                         @FT_GLYPH_FORMAT_BITMAP,                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1495
  /*                         @FT_GLYPH_FORMAT_OUTLINE, or                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1496
  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but others are    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1497
  /*                         possible.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1498
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1499
  /*    bitmap            :: This field is used as a bitmap descriptor     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1500
  /*                         when the slot format is                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1501
  /*                         @FT_GLYPH_FORMAT_BITMAP.  Note that the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1502
  /*                         address and content of the bitmap buffer can  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1503
  /*                         change between calls of @FT_Load_Glyph and a  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1504
  /*                         few other functions.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1505
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1506
  /*    bitmap_left       :: This is the bitmap's left bearing expressed   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1507
  /*                         in integer pixels.  Of course, this is only   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1508
  /*                         valid if the format is                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1509
  /*                         @FT_GLYPH_FORMAT_BITMAP.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1510
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1511
  /*    bitmap_top        :: This is the bitmap's top bearing expressed in */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1512
  /*                         integer pixels.  Remember that this is the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1513
  /*                         distance from the baseline to the top-most    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1514
  /*                         glyph scanline, upwards y~coordinates being   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1515
  /*                         *positive*.                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1516
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1517
  /*    outline           :: The outline descriptor for the current glyph  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1518
  /*                         image if its format is                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1519
  /*                         @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1520
  /*                         loaded, `outline' can be transformed,         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1521
  /*                         distorted, embolded, etc.  However, it must   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1522
  /*                         not be freed.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1523
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1524
  /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1525
  /*                         This field is only valid for the composite    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1526
  /*                         glyph format that should normally only be     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1527
  /*                         loaded with the @FT_LOAD_NO_RECURSE flag.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1528
  /*                         For now this is internal to FreeType.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1529
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1530
  /*    subglyphs         :: An array of subglyph descriptors for          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1531
  /*                         composite glyphs.  There are `num_subglyphs'  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1532
  /*                         elements in there.  Currently internal to     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1533
  /*                         FreeType.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1534
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1535
  /*    control_data      :: Certain font drivers can also return the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1536
  /*                         control data for a given glyph image (e.g.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1537
  /*                         TrueType bytecode, Type~1 charstrings, etc.). */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1538
  /*                         This field is a pointer to such data.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1539
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1540
  /*    control_len       :: This is the length in bytes of the control    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1541
  /*                         data.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1542
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1543
  /*    other             :: Really wicked formats can use this pointer to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1544
  /*                         present their own glyph image to client       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1545
  /*                         applications.  Note that the application      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1546
  /*                         needs to know about the image format.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1547
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1548
  /*    lsb_delta         :: The difference between hinted and unhinted    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1549
  /*                         left side bearing while autohinting is        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1550
  /*                         active.  Zero otherwise.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1551
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1552
  /*    rsb_delta         :: The difference between hinted and unhinted    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1553
  /*                         right side bearing while autohinting is       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1554
  /*                         active.  Zero otherwise.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1555
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1556
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1557
  /*    If @FT_Load_Glyph is called with default flags (see                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1558
  /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1559
  /*    its native format (e.g., an outline glyph for TrueType and Type~1  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1560
  /*    formats).                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1561
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1562
  /*    This image can later be converted into a bitmap by calling         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1563
  /*    @FT_Render_Glyph.  This function finds the current renderer for    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1564
  /*    the native image's format, then invokes it.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1565
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1566
  /*    The renderer is in charge of transforming the native image through */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1567
  /*    the slot's face transformation fields, then converting it into a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1568
  /*    bitmap that is returned in `slot->bitmap'.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1569
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1570
  /*    Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1571
  /*    to specify the position of the bitmap relative to the current pen  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1572
  /*    position (e.g., coordinates (0,0) on the baseline).  Of course,    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1573
  /*    `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1574
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1575
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1576
  /*    Here a small pseudo code fragment which shows how to use           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1577
  /*    `lsb_delta' and `rsb_delta':                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1578
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1579
  /*    {                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1580
  /*      FT_Pos  origin_x       = 0;                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1581
  /*      FT_Pos  prev_rsb_delta = 0;                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1582
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1583
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1584
  /*      for all glyphs do                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1585
  /*        <compute kern between current and previous glyph and add it to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1586
  /*         `origin_x'>                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1587
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1588
  /*        <load glyph with `FT_Load_Glyph'>                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1589
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1590
  /*        if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1591
  /*          origin_x -= 64;                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1592
  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1593
  /*          origin_x += 64;                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1594
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1595
  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1596
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1597
  /*        <save glyph image, or render glyph, or ...>                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1598
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1599
  /*        origin_x += face->glyph->advance.x;                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1600
  /*      endfor                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1601
  /*    }                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1602
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1603
  typedef struct  FT_GlyphSlotRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1604
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1605
    FT_Library        library;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1606
    FT_Face           face;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1607
    FT_GlyphSlot      next;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1608
    FT_UInt           reserved;       /* retained for binary compatibility */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1609
    FT_Generic        generic;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1610
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1611
    FT_Glyph_Metrics  metrics;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1612
    FT_Fixed          linearHoriAdvance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1613
    FT_Fixed          linearVertAdvance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1614
    FT_Vector         advance;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1615
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1616
    FT_Glyph_Format   format;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1617
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1618
    FT_Bitmap         bitmap;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1619
    FT_Int            bitmap_left;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1620
    FT_Int            bitmap_top;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1621
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1622
    FT_Outline        outline;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1623
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1624
    FT_UInt           num_subglyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1625
    FT_SubGlyph       subglyphs;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1626
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1627
    void*             control_data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1628
    long              control_len;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1629
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1630
    FT_Pos            lsb_delta;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1631
    FT_Pos            rsb_delta;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1632
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1633
    void*             other;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1634
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1635
    FT_Slot_Internal  internal;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1636
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1637
  } FT_GlyphSlotRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1638
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1639
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1640
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1641
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1642
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1643
  /*                         F U N C T I O N S                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1644
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1645
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1646
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1647
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1648
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1649
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1650
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1651
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1652
  /*    FT_Init_FreeType                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1653
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1654
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1655
  /*    Initialize a new FreeType library object.  The set of modules      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1656
  /*    that are registered by this function is determined at build time.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1657
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1658
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1659
  /*    alibrary :: A handle to a new library object.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1660
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1661
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1662
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1663
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1664
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1665
  /*    In case you want to provide your own memory allocating routines,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1666
  /*    use @FT_New_Library instead, followed by a call to                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1667
  /*    @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module).  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1668
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1669
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1670
  FT_Init_FreeType( FT_Library  *alibrary );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1671
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1672
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1673
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1674
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1675
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1676
  /*    FT_Done_FreeType                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1677
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1678
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1679
  /*    Destroy a given FreeType library object and all of its children,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1680
  /*    including resources, drivers, faces, sizes, etc.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1681
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1682
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1683
  /*    library :: A handle to the target library object.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1684
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1685
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1686
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1687
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1688
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1689
  FT_Done_FreeType( FT_Library  library );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1690
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1691
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1692
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1693
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1694
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1695
  /*    FT_OPEN_XXX                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1696
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1697
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1698
  /*    A list of bit-field constants used within the `flags' field of the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1699
  /*    @FT_Open_Args structure.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1700
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1701
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1702
  /*    FT_OPEN_MEMORY   :: This is a memory-based stream.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1703
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1704
  /*    FT_OPEN_STREAM   :: Copy the stream from the `stream' field.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1705
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1706
  /*    FT_OPEN_PATHNAME :: Create a new input stream from a C~path        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1707
  /*                        name.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1708
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1709
  /*    FT_OPEN_DRIVER   :: Use the `driver' field.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1710
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1711
  /*    FT_OPEN_PARAMS   :: Use the `num_params' and `params' fields.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1712
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1713
  /*    ft_open_memory   :: Deprecated; use @FT_OPEN_MEMORY instead.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1714
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1715
  /*    ft_open_stream   :: Deprecated; use @FT_OPEN_STREAM instead.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1716
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1717
  /*    ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1718
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1719
  /*    ft_open_driver   :: Deprecated; use @FT_OPEN_DRIVER instead.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1720
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1721
  /*    ft_open_params   :: Deprecated; use @FT_OPEN_PARAMS instead.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1722
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1723
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1724
  /*    The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME'     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1725
  /*    flags are mutually exclusive.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1726
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1727
#define FT_OPEN_MEMORY    0x1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1728
#define FT_OPEN_STREAM    0x2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1729
#define FT_OPEN_PATHNAME  0x4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1730
#define FT_OPEN_DRIVER    0x8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1731
#define FT_OPEN_PARAMS    0x10
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1732
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1733
#define ft_open_memory    FT_OPEN_MEMORY     /* deprecated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1734
#define ft_open_stream    FT_OPEN_STREAM     /* deprecated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1735
#define ft_open_pathname  FT_OPEN_PATHNAME   /* deprecated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1736
#define ft_open_driver    FT_OPEN_DRIVER     /* deprecated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1737
#define ft_open_params    FT_OPEN_PARAMS     /* deprecated */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1738
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1739
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1740
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1741
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1742
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1743
  /*    FT_Parameter                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1744
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1745
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1746
  /*    A simple structure used to pass more or less generic parameters to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1747
  /*    @FT_Open_Face.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1748
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1749
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1750
  /*    tag  :: A four-byte identification tag.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1751
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1752
  /*    data :: A pointer to the parameter data.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1753
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1754
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1755
  /*    The ID and function of parameters are driver-specific.  See the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1756
  /*    various FT_PARAM_TAG_XXX flags for more information.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1757
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1758
  typedef struct  FT_Parameter_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1759
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1760
    FT_ULong    tag;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1761
    FT_Pointer  data;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1762
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1763
  } FT_Parameter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1764
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1765
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1766
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1767
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1768
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1769
  /*    FT_Open_Args                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1770
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1771
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1772
  /*    A structure used to indicate how to open a new font file or        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1773
  /*    stream.  A pointer to such a structure can be used as a parameter  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1774
  /*    for the functions @FT_Open_Face and @FT_Attach_Stream.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1775
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1776
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1777
  /*    flags       :: A set of bit flags indicating how to use the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1778
  /*                   structure.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1779
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1780
  /*    memory_base :: The first byte of the file in memory.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1781
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1782
  /*    memory_size :: The size in bytes of the file in memory.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1783
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1784
  /*    pathname    :: A pointer to an 8-bit file pathname.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1785
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1786
  /*    stream      :: A handle to a source stream object.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1787
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1788
  /*    driver      :: This field is exclusively used by @FT_Open_Face;    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1789
  /*                   it simply specifies the font driver to use to open  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1790
  /*                   the face.  If set to~0, FreeType tries to load the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1791
  /*                   face with each one of the drivers in its list.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1792
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1793
  /*    num_params  :: The number of extra parameters.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1794
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1795
  /*    params      :: Extra parameters passed to the font driver when     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1796
  /*                   opening a new face.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1797
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1798
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1799
  /*    The stream type is determined by the contents of `flags' which     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1800
  /*    are tested in the following order by @FT_Open_Face:                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1801
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1802
  /*    If the `FT_OPEN_MEMORY' bit is set, assume that this is a          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1803
  /*    memory file of `memory_size' bytes, located at `memory_address'.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1804
  /*    The data are are not copied, and the client is responsible for     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1805
  /*    releasing and destroying them _after_ the corresponding call to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1806
  /*    @FT_Done_Face.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1807
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1808
  /*    Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1809
  /*    custom input stream `stream' is used.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1810
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1811
  /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1812
  /*    is a normal file and use `pathname' to open it.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1813
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1814
  /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1815
  /*    open the file with the driver whose handler is in `driver'.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1816
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1817
  /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1818
  /*    `num_params' and `params' is used.  They are ignored otherwise.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1819
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1820
  /*    Ideally, both the `pathname' and `params' fields should be tagged  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1821
  /*    as `const'; this is missing for API backwards compatibility.  In   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1822
  /*    other words, applications should treat them as read-only.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1823
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1824
  typedef struct  FT_Open_Args_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1825
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1826
    FT_UInt         flags;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1827
    const FT_Byte*  memory_base;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1828
    FT_Long         memory_size;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1829
    FT_String*      pathname;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1830
    FT_Stream       stream;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1831
    FT_Module       driver;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1832
    FT_Int          num_params;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1833
    FT_Parameter*   params;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1834
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1835
  } FT_Open_Args;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1836
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1837
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1838
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1839
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1840
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1841
  /*    FT_New_Face                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1842
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1843
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1844
  /*    This function calls @FT_Open_Face to open a font by its pathname.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1845
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1846
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1847
  /*    library    :: A handle to the library resource.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1848
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1849
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1850
  /*    pathname   :: A path to the font file.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1851
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1852
  /*    face_index :: The index of the face within the font.  The first    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1853
  /*                  face has index~0.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1854
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1855
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1856
  /*    aface      :: A handle to a new face object.  If `face_index' is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1857
  /*                  greater than or equal to zero, it must be non-NULL.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1858
  /*                  See @FT_Open_Face for more details.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1859
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1860
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1861
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1862
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1863
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1864
  FT_New_Face( FT_Library   library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1865
               const char*  filepathname,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1866
               FT_Long      face_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1867
               FT_Face     *aface );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1868
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1869
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1870
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1871
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1872
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1873
  /*    FT_New_Memory_Face                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1874
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1875
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1876
  /*    This function calls @FT_Open_Face to open a font which has been    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1877
  /*    loaded into memory.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1878
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1879
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1880
  /*    library    :: A handle to the library resource.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1881
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1882
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1883
  /*    file_base  :: A pointer to the beginning of the font data.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1884
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1885
  /*    file_size  :: The size of the memory chunk used by the font data.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1886
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1887
  /*    face_index :: The index of the face within the font.  The first    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1888
  /*                  face has index~0.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1889
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1890
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1891
  /*    aface      :: A handle to a new face object.  If `face_index' is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1892
  /*                  greater than or equal to zero, it must be non-NULL.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1893
  /*                  See @FT_Open_Face for more details.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1894
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1895
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1896
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1897
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1898
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1899
  /*    You must not deallocate the memory before calling @FT_Done_Face.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1900
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1901
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1902
  FT_New_Memory_Face( FT_Library      library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1903
                      const FT_Byte*  file_base,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1904
                      FT_Long         file_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1905
                      FT_Long         face_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1906
                      FT_Face        *aface );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1907
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1908
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1909
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1910
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1911
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1912
  /*    FT_Open_Face                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1913
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1914
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1915
  /*    Create a face object from a given resource described by            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1916
  /*    @FT_Open_Args.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1917
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1918
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1919
  /*    library    :: A handle to the library resource.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1920
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1921
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1922
  /*    args       :: A pointer to an `FT_Open_Args' structure which must  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1923
  /*                  be filled by the caller.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1924
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1925
  /*    face_index :: The index of the face within the font.  The first    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1926
  /*                  face has index~0.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1927
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1928
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1929
  /*    aface      :: A handle to a new face object.  If `face_index' is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1930
  /*                  greater than or equal to zero, it must be non-NULL.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1931
  /*                  See note below.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1932
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1933
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1934
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1935
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1936
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1937
  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1938
  /*    slot for the face object which can be accessed directly through    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1939
  /*    `face->glyph'.                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1940
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1941
  /*    FT_Open_Face can be used to quickly check whether the font         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1942
  /*    format of a given font resource is supported by FreeType.  If the  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1943
  /*    `face_index' field is negative, the function's return value is~0   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1944
  /*    if the font format is recognized, or non-zero otherwise;           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1945
  /*    the function returns a more or less empty face handle in `*aface'  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1946
  /*    (if `aface' isn't NULL).  The only useful field in this special    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1947
  /*    case is `face->num_faces' which gives the number of faces within   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1948
  /*    the font file.  After examination, the returned @FT_Face structure */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1949
  /*    should be deallocated with a call to @FT_Done_Face.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1950
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1951
  /*    Each new face object created with this function also owns a        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1952
  /*    default @FT_Size object, accessible as `face->size'.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1953
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1954
  /*    See the discussion of reference counters in the description of     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1955
  /*    @FT_Reference_Face.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1956
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1957
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1958
  FT_Open_Face( FT_Library           library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1959
                const FT_Open_Args*  args,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1960
                FT_Long              face_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1961
                FT_Face             *aface );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1962
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1963
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1964
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1965
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1966
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1967
  /*    FT_Attach_File                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1968
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1969
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1970
  /*    This function calls @FT_Attach_Stream to attach a file.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1971
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1972
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1973
  /*    face         :: The target face object.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1974
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1975
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1976
  /*    filepathname :: The pathname.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1977
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1978
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1979
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1980
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1981
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1982
  FT_Attach_File( FT_Face      face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1983
                  const char*  filepathname );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1984
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1985
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1986
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1987
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1988
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1989
  /*    FT_Attach_Stream                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1990
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1991
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1992
  /*    `Attach' data to a face object.  Normally, this is used to read    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1993
  /*    additional information for the face object.  For example, you can  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1994
  /*    attach an AFM file that comes with a Type~1 font to get the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1995
  /*    kerning values and other metrics.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1996
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1997
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1998
  /*    face       :: The target face object.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  1999
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2000
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2001
  /*    parameters :: A pointer to @FT_Open_Args which must be filled by   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2002
  /*                  the caller.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2003
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2004
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2005
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2006
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2007
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2008
  /*    The meaning of the `attach' (i.e., what really happens when the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2009
  /*    new file is read) is not fixed by FreeType itself.  It really      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2010
  /*    depends on the font format (and thus the font driver).             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2011
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2012
  /*    Client applications are expected to know what they are doing       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2013
  /*    when invoking this function.  Most drivers simply do not implement */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2014
  /*    file attachments.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2015
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2016
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2017
  FT_Attach_Stream( FT_Face        face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2018
                    FT_Open_Args*  parameters );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2019
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2020
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2021
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2022
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2023
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2024
  /*    FT_Reference_Face                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2025
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2026
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2027
  /*    A counter gets initialized to~1 at the time an @FT_Face structure  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2028
  /*    is created.  This function increments the counter.  @FT_Done_Face  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2029
  /*    then only destroys a face if the counter is~1, otherwise it simply */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2030
  /*    decrements the counter.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2031
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2032
  /*    This function helps in managing life-cycles of structures which    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2033
  /*    reference @FT_Face objects.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2034
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2035
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2036
  /*    face :: A handle to a target face object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2037
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2038
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2039
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2040
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2041
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2042
  /*    2.4.2                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2043
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2044
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2045
  FT_Reference_Face( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2046
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2047
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2048
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2049
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2050
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2051
  /*    FT_Done_Face                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2052
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2053
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2054
  /*    Discard a given face object, as well as all of its child slots and */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2055
  /*    sizes.                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2056
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2057
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2058
  /*    face :: A handle to a target face object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2059
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2060
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2061
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2062
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2063
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2064
  /*    See the discussion of reference counters in the description of     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2065
  /*    @FT_Reference_Face.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2066
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2067
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2068
  FT_Done_Face( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2069
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2070
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2071
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2072
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2073
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2074
  /*    FT_Select_Size                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2075
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2076
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2077
  /*    Select a bitmap strike.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2078
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2079
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2080
  /*    face         :: A handle to a target face object.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2081
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2082
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2083
  /*    strike_index :: The index of the bitmap strike in the              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2084
  /*                    `available_sizes' field of @FT_FaceRec structure.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2085
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2086
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2087
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2088
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2089
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2090
  FT_Select_Size( FT_Face  face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2091
                  FT_Int   strike_index );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2092
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2093
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2094
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2095
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2096
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2097
  /*    FT_Size_Request_Type                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2098
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2099
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2100
  /*    An enumeration type that lists the supported size request types.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2101
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2102
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2103
  /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2104
  /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2105
  /*      used to determine both scaling values.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2106
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2107
  /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2108
  /*      The real dimension.  The sum of the the `Ascender' and (minus    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2109
  /*      of) the `Descender' fields of @FT_FaceRec are used to determine  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2110
  /*      both scaling values.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2111
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2112
  /*    FT_SIZE_REQUEST_TYPE_BBOX ::                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2113
  /*      The font bounding box.  The width and height of the `bbox' field */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2114
  /*      of @FT_FaceRec are used to determine the horizontal and vertical */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2115
  /*      scaling value, respectively.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2116
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2117
  /*    FT_SIZE_REQUEST_TYPE_CELL ::                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2118
  /*      The `max_advance_width' field of @FT_FaceRec is used to          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2119
  /*      determine the horizontal scaling value; the vertical scaling     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2120
  /*      value is determined the same way as                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2121
  /*      @FT_SIZE_REQUEST_TYPE_REAL_DIM does.  Finally, both scaling      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2122
  /*      values are set to the smaller one.  This type is useful if you   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2123
  /*      want to specify the font size for, say, a window of a given      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2124
  /*      dimension and 80x24 cells.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2125
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2126
  /*    FT_SIZE_REQUEST_TYPE_SCALES ::                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2127
  /*      Specify the scaling values directly.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2129
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2130
  /*    The above descriptions only apply to scalable formats.  For bitmap */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2131
  /*    formats, the behaviour is up to the driver.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2132
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2133
  /*    See the note section of @FT_Size_Metrics if you wonder how size    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2134
  /*    requesting relates to scaling values.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2135
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2136
  typedef enum  FT_Size_Request_Type_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2137
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2138
    FT_SIZE_REQUEST_TYPE_NOMINAL,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2139
    FT_SIZE_REQUEST_TYPE_REAL_DIM,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2140
    FT_SIZE_REQUEST_TYPE_BBOX,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2141
    FT_SIZE_REQUEST_TYPE_CELL,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2142
    FT_SIZE_REQUEST_TYPE_SCALES,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2143
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2144
    FT_SIZE_REQUEST_TYPE_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2145
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2146
  } FT_Size_Request_Type;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2147
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2148
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2149
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2150
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2151
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2152
  /*    FT_Size_RequestRec                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2153
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2154
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2155
  /*    A structure used to model a size request.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2156
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2157
  /* <Fields>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2158
  /*    type           :: See @FT_Size_Request_Type.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2159
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2160
  /*    width          :: The desired width.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2161
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2162
  /*    height         :: The desired height.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2163
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2164
  /*    horiResolution :: The horizontal resolution.  If set to zero,      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2165
  /*                      `width' is treated as a 26.6 fractional pixel    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2166
  /*                      value.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2167
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2168
  /*    vertResolution :: The vertical resolution.  If set to zero,        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2169
  /*                      `height' is treated as a 26.6 fractional pixel   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2170
  /*                      value.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2171
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2172
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2173
  /*    If `width' is zero, then the horizontal scaling value is set equal */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2174
  /*    to the vertical scaling value, and vice versa.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2175
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2176
  typedef struct  FT_Size_RequestRec_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2177
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2178
    FT_Size_Request_Type  type;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2179
    FT_Long               width;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2180
    FT_Long               height;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2181
    FT_UInt               horiResolution;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2182
    FT_UInt               vertResolution;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2183
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2184
  } FT_Size_RequestRec;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2185
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2186
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2187
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2188
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2189
  /* <Struct>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2190
  /*    FT_Size_Request                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2191
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2192
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2193
  /*    A handle to a size request structure.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2194
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2195
  typedef struct FT_Size_RequestRec_  *FT_Size_Request;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2196
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2197
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2198
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2199
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2200
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2201
  /*    FT_Request_Size                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2202
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2203
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2204
  /*    Resize the scale of the active @FT_Size object in a face.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2205
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2206
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2207
  /*    face :: A handle to a target face object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2208
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2209
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2210
  /*    req  :: A pointer to a @FT_Size_RequestRec.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2211
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2212
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2213
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2214
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2215
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2216
  /*    Although drivers may select the bitmap strike matching the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2217
  /*    request, you should not rely on this if you intend to select a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2218
  /*    particular bitmap strike.  Use @FT_Select_Size instead in that     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2219
  /*    case.                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2220
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2221
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2222
  FT_Request_Size( FT_Face          face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2223
                   FT_Size_Request  req );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2224
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2225
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2226
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2227
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2228
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2229
  /*    FT_Set_Char_Size                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2230
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2231
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2232
  /*    This function calls @FT_Request_Size to request the nominal size   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2233
  /*    (in points).                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2234
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2235
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2236
  /*    face            :: A handle to a target face object.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2237
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2238
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2239
  /*    char_width      :: The nominal width, in 26.6 fractional points.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2240
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2241
  /*    char_height     :: The nominal height, in 26.6 fractional points.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2242
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2243
  /*    horz_resolution :: The horizontal resolution in dpi.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2244
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2245
  /*    vert_resolution :: The vertical resolution in dpi.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2246
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2247
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2248
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2249
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2250
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2251
  /*    If either the character width or height is zero, it is set equal   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2252
  /*    to the other value.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2253
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2254
  /*    If either the horizontal or vertical resolution is zero, it is set */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2255
  /*    equal to the other value.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2256
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2257
  /*    A character width or height smaller than 1pt is set to 1pt; if     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2258
  /*    both resolution values are zero, they are set to 72dpi.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2259
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2260
  /*    Don't use this function if you are using the FreeType cache API.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2261
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2262
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2263
  FT_Set_Char_Size( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2264
                    FT_F26Dot6  char_width,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2265
                    FT_F26Dot6  char_height,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2266
                    FT_UInt     horz_resolution,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2267
                    FT_UInt     vert_resolution );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2268
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2269
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2270
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2271
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2272
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2273
  /*    FT_Set_Pixel_Sizes                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2274
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2275
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2276
  /*    This function calls @FT_Request_Size to request the nominal size   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2277
  /*    (in pixels).                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2278
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2279
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2280
  /*    face         :: A handle to the target face object.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2281
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2282
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2283
  /*    pixel_width  :: The nominal width, in pixels.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2284
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2285
  /*    pixel_height :: The nominal height, in pixels.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2286
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2287
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2288
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2289
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2290
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2291
  FT_Set_Pixel_Sizes( FT_Face  face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2292
                      FT_UInt  pixel_width,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2293
                      FT_UInt  pixel_height );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2294
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2295
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2296
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2297
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2298
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2299
  /*    FT_Load_Glyph                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2300
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2301
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2302
  /*    A function used to load a single glyph into the glyph slot of a    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2303
  /*    face object.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2304
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2305
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2306
  /*    face        :: A handle to the target face object where the glyph  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2307
  /*                   is loaded.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2308
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2309
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2310
  /*    glyph_index :: The index of the glyph in the font file.  For       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2311
  /*                   CID-keyed fonts (either in PS or in CFF format)     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2312
  /*                   this argument specifies the CID value.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2313
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2314
  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2315
  /*                   @FT_LOAD_XXX constants can be used to control the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2316
  /*                   glyph loading process (e.g., whether the outline    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2317
  /*                   should be scaled, whether to load bitmaps or not,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2318
  /*                   whether to hint the outline, etc).                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2319
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2320
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2321
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2322
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2323
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2324
  /*    The loaded glyph may be transformed.  See @FT_Set_Transform for    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2325
  /*    the details.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2326
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2327
  /*    For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2328
  /*    returned for invalid CID values (this is, for CID values which     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2329
  /*    don't have a corresponding glyph in the font).  See the discussion */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2330
  /*    of the @FT_FACE_FLAG_CID_KEYED flag for more details.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2331
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2332
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2333
  FT_Load_Glyph( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2334
                 FT_UInt   glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2335
                 FT_Int32  load_flags );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2336
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2337
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2338
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2339
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2340
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2341
  /*    FT_Load_Char                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2342
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2343
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2344
  /*    A function used to load a single glyph into the glyph slot of a    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2345
  /*    face object, according to its character code.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2346
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2347
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2348
  /*    face        :: A handle to a target face object where the glyph    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2349
  /*                   is loaded.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2350
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2351
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2352
  /*    char_code   :: The glyph's character code, according to the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2353
  /*                   current charmap used in the face.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2354
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2355
  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2356
  /*                   @FT_LOAD_XXX constants can be used to control the   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2357
  /*                   glyph loading process (e.g., whether the outline    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2358
  /*                   should be scaled, whether to load bitmaps or not,   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2359
  /*                   whether to hint the outline, etc).                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2360
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2361
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2362
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2363
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2364
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2365
  /*    This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2366
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2367
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2368
  FT_Load_Char( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2369
                FT_ULong  char_code,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2370
                FT_Int32  load_flags );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2371
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2372
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2373
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2374
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2375
   * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2376
   *   FT_LOAD_XXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2377
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2378
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2379
   *   A list of bit-field constants used with @FT_Load_Glyph to indicate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2380
   *   what kind of operations to perform during glyph loading.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2381
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2382
   * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2383
   *   FT_LOAD_DEFAULT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2384
   *     Corresponding to~0, this value is used as the default glyph load
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2385
   *     operation.  In this case, the following happens:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2386
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2387
   *     1. FreeType looks for a bitmap for the glyph corresponding to the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2388
   *        face's current size.  If one is found, the function returns.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2389
   *        The bitmap data can be accessed from the glyph slot (see note
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2390
   *        below).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2391
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2392
   *     2. If no embedded bitmap is searched or found, FreeType looks for a
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2393
   *        scalable outline.  If one is found, it is loaded from the font
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2394
   *        file, scaled to device pixels, then `hinted' to the pixel grid
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2395
   *        in order to optimize it.  The outline data can be accessed from
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2396
   *        the glyph slot (see note below).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2397
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2398
   *     Note that by default, the glyph loader doesn't render outlines into
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2399
   *     bitmaps.  The following flags are used to modify this default
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2400
   *     behaviour to more specific and useful cases.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2401
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2402
   *   FT_LOAD_NO_SCALE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2403
   *     Don't scale the outline glyph loaded, but keep it in font units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2404
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2405
   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2406
   *     unsets @FT_LOAD_RENDER.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2407
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2408
   *   FT_LOAD_NO_HINTING ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2409
   *     Disable hinting.  This generally generates `blurrier' bitmap glyph
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2410
   *     when the glyph is rendered in any of the anti-aliased modes.  See
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2411
   *     also the note below.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2412
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2413
   *     This flag is implied by @FT_LOAD_NO_SCALE.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2414
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2415
   *   FT_LOAD_RENDER ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2416
   *     Call @FT_Render_Glyph after the glyph is loaded.  By default, the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2417
   *     glyph is rendered in @FT_RENDER_MODE_NORMAL mode.  This can be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2418
   *     overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2419
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2420
   *     This flag is unset by @FT_LOAD_NO_SCALE.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2421
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2422
   *   FT_LOAD_NO_BITMAP ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2423
   *     Ignore bitmap strikes when loading.  Bitmap-only fonts ignore this
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2424
   *     flag.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2425
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2426
   *     @FT_LOAD_NO_SCALE always sets this flag.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2427
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2428
   *   FT_LOAD_VERTICAL_LAYOUT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2429
   *     Load the glyph for vertical text layout.  _Don't_ use it as it is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2430
   *     problematic currently.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2431
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2432
   *   FT_LOAD_FORCE_AUTOHINT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2433
   *     Indicates that the auto-hinter is preferred over the font's native
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2434
   *     hinter.  See also the note below.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2435
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2436
   *   FT_LOAD_CROP_BITMAP ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2437
   *     Indicates that the font driver should crop the loaded bitmap glyph
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2438
   *     (i.e., remove all space around its black bits).  Not all drivers
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2439
   *     implement this.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2440
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2441
   *   FT_LOAD_PEDANTIC ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2442
   *     Indicates that the font driver should perform pedantic verifications
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2443
   *     during glyph loading.  This is mostly used to detect broken glyphs
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2444
   *     in fonts.  By default, FreeType tries to handle broken fonts also.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2445
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2446
   *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2447
   *     Ignored.  Deprecated.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2448
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2449
   *   FT_LOAD_NO_RECURSE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2450
   *     This flag is only used internally.  It merely indicates that the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2451
   *     font driver should not load composite glyphs recursively.  Instead,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2452
   *     it should set the `num_subglyph' and `subglyphs' values of the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2453
   *     glyph slot accordingly, and set `glyph->format' to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2454
   *     @FT_GLYPH_FORMAT_COMPOSITE.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2455
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2456
   *     The description of sub-glyphs is not available to client
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2457
   *     applications for now.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2458
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2459
   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2460
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2461
   *   FT_LOAD_IGNORE_TRANSFORM ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2462
   *     Indicates that the transform matrix set by @FT_Set_Transform should
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2463
   *     be ignored.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2464
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2465
   *   FT_LOAD_MONOCHROME ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2466
   *     This flag is used with @FT_LOAD_RENDER to indicate that you want to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2467
   *     render an outline glyph to a 1-bit monochrome bitmap glyph, with
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2468
   *     8~pixels packed into each byte of the bitmap data.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2469
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2470
   *     Note that this has no effect on the hinting algorithm used.  You
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2471
   *     should rather use @FT_LOAD_TARGET_MONO so that the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2472
   *     monochrome-optimized hinting algorithm is used.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2473
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2474
   *   FT_LOAD_LINEAR_DESIGN ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2475
   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2476
   *     fields of @FT_GlyphSlotRec should be kept in font units.  See
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2477
   *     @FT_GlyphSlotRec for details.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2478
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2479
   *   FT_LOAD_NO_AUTOHINT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2480
   *     Disable auto-hinter.  See also the note below.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2481
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2482
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2483
   *   By default, hinting is enabled and the font's native hinter (see
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2484
   *   @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter.  You can
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2485
   *   disable hinting by setting @FT_LOAD_NO_HINTING or change the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2486
   *   precedence by setting @FT_LOAD_FORCE_AUTOHINT.  You can also set
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2487
   *   @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2488
   *   used at all.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2489
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2490
   *   See the description of @FT_FACE_FLAG_TRICKY for a special exception
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2491
   *   (affecting only a handful of Asian fonts).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2492
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2493
   *   Besides deciding which hinter to use, you can also decide which
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2494
   *   hinting algorithm to use.  See @FT_LOAD_TARGET_XXX for details.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2495
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2496
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2497
#define FT_LOAD_DEFAULT                      0x0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2498
#define FT_LOAD_NO_SCALE                     0x1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2499
#define FT_LOAD_NO_HINTING                   0x2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2500
#define FT_LOAD_RENDER                       0x4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2501
#define FT_LOAD_NO_BITMAP                    0x8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2502
#define FT_LOAD_VERTICAL_LAYOUT              0x10
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2503
#define FT_LOAD_FORCE_AUTOHINT               0x20
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2504
#define FT_LOAD_CROP_BITMAP                  0x40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2505
#define FT_LOAD_PEDANTIC                     0x80
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2506
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  0x200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2507
#define FT_LOAD_NO_RECURSE                   0x400
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2508
#define FT_LOAD_IGNORE_TRANSFORM             0x800
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2509
#define FT_LOAD_MONOCHROME                   0x1000
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2510
#define FT_LOAD_LINEAR_DESIGN                0x2000
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2511
#define FT_LOAD_NO_AUTOHINT                  0x8000U
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2512
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2513
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2514
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2515
  /* used internally only by certain font drivers! */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2516
#define FT_LOAD_ADVANCE_ONLY                 0x100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2517
#define FT_LOAD_SBITS_ONLY                   0x4000
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2518
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2519
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2520
  /**************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2521
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2522
   * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2523
   *   FT_LOAD_TARGET_XXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2524
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2525
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2526
   *   A list of values that are used to select a specific hinting algorithm
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2527
   *   to use by the hinter.  You should OR one of these values to your
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2528
   *   `load_flags' when calling @FT_Load_Glyph.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2529
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2530
   *   Note that font's native hinters may ignore the hinting algorithm you
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2531
   *   have specified (e.g., the TrueType bytecode interpreter).  You can set
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2532
   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2533
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2534
   *   Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2535
   *   always implies @FT_LOAD_FORCE_AUTOHINT.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2536
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2537
   * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2538
   *   FT_LOAD_TARGET_NORMAL ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2539
   *     This corresponds to the default hinting algorithm, optimized for
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2540
   *     standard gray-level rendering.  For monochrome output, use
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2541
   *     @FT_LOAD_TARGET_MONO instead.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2542
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2543
   *   FT_LOAD_TARGET_LIGHT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2544
   *     A lighter hinting algorithm for non-monochrome modes.  Many
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2545
   *     generated glyphs are more fuzzy but better resemble its original
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2546
   *     shape.  A bit like rendering on Mac OS~X.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2547
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2548
   *     As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2549
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2550
   *   FT_LOAD_TARGET_MONO ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2551
   *     Strong hinting algorithm that should only be used for monochrome
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2552
   *     output.  The result is probably unpleasant if the glyph is rendered
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2553
   *     in non-monochrome modes.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2554
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2555
   *   FT_LOAD_TARGET_LCD ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2556
   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2557
   *     decimated LCD displays.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2558
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2559
   *   FT_LOAD_TARGET_LCD_V ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2560
   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2561
   *     decimated LCD displays.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2562
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2563
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2564
   *   You should use only _one_ of the FT_LOAD_TARGET_XXX values in your
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2565
   *   `load_flags'.  They can't be ORed.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2566
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2567
   *   If @FT_LOAD_RENDER is also set, the glyph is rendered in the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2568
   *   corresponding mode (i.e., the mode which matches the used algorithm
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2569
   *   best) unless @FT_LOAD_MONOCHROME is set.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2570
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2571
   *   You can use a hinting algorithm that doesn't correspond to the same
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2572
   *   rendering mode.  As an example, it is possible to use the `light'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2573
   *   hinting algorithm and have the results rendered in horizontal LCD
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2574
   *   pixel mode, with code like
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2575
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2576
   *     {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2577
   *       FT_Load_Glyph( face, glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2578
   *                      load_flags | FT_LOAD_TARGET_LIGHT );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2579
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2580
   *       FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2581
   *     }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2582
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2583
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2584
#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2585
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2586
#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2587
#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2588
#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2589
#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2590
#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2591
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2592
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2593
  /**************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2594
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2595
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2596
   *   FT_LOAD_TARGET_MODE
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2597
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2598
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2599
   *   Return the @FT_Render_Mode corresponding to a given
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2600
   *   @FT_LOAD_TARGET_XXX value.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2601
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2602
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2603
#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2604
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2605
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2606
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2607
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2608
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2609
  /*    FT_Set_Transform                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2610
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2611
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2612
  /*    A function used to set the transformation that is applied to glyph */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2613
  /*    images when they are loaded into a glyph slot through              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2614
  /*    @FT_Load_Glyph.                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2615
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2616
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2617
  /*    face   :: A handle to the source face object.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2618
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2619
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2620
  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use~0 for */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2621
  /*              the identity matrix.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2622
  /*    delta  :: A pointer to the translation vector.  Use~0 for the null */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2623
  /*              vector.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2624
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2625
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2626
  /*    The transformation is only applied to scalable image formats after */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2627
  /*    the glyph has been loaded.  It means that hinting is unaltered by  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2628
  /*    the transformation and is performed on the character size given in */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2629
  /*    the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2630
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2631
  /*    Note that this also transforms the `face.glyph.advance' field, but */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2632
  /*    *not* the values in `face.glyph.metrics'.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2633
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2634
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2635
  FT_Set_Transform( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2636
                    FT_Matrix*  matrix,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2637
                    FT_Vector*  delta );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2638
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2639
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2640
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2641
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2642
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2643
  /*    FT_Render_Mode                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2644
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2645
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2646
  /*    An enumeration type that lists the render modes supported by       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2647
  /*    FreeType~2.  Each mode corresponds to a specific type of scanline  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2648
  /*    conversion performed on the outline.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2649
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2650
  /*    For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode'     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2651
  /*    field in the @FT_GlyphSlotRec structure gives the format of the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2652
  /*    returned bitmap.                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2653
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2654
  /*    All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2655
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2656
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2657
  /*    FT_RENDER_MODE_NORMAL ::                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2658
  /*      This is the default render mode; it corresponds to 8-bit         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2659
  /*      anti-aliased bitmaps.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2660
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2661
  /*    FT_RENDER_MODE_LIGHT ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2662
  /*      This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2663
  /*      defined as a separate value because render modes are also used   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2664
  /*      indirectly to define hinting algorithm selectors.  See           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2665
  /*      @FT_LOAD_TARGET_XXX for details.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2666
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2667
  /*    FT_RENDER_MODE_MONO ::                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2668
  /*      This mode corresponds to 1-bit bitmaps (with 2~levels of         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2669
  /*      opacity).                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2670
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2671
  /*    FT_RENDER_MODE_LCD ::                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2672
  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2673
  /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2674
  /*      3~times the width of the original glyph outline in pixels, and   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2675
  /*      which use the @FT_PIXEL_MODE_LCD mode.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2676
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2677
  /*    FT_RENDER_MODE_LCD_V ::                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2678
  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2679
  /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2680
  /*      8-bit bitmaps that are 3~times the height of the original        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2681
  /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2682
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2683
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2684
  /*    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2685
  /*    filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2686
  /*    (not active in the default builds).  It is up to the caller to     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2687
  /*    either call @FT_Library_SetLcdFilter (if available) or do the      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2688
  /*    filtering itself.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2689
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2690
  /*    The selected render mode only affects vector glyphs of a font.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2691
  /*    Embedded bitmaps often have a different pixel mode like            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2692
  /*    @FT_PIXEL_MODE_MONO.  You can use @FT_Bitmap_Convert to transform  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2693
  /*    them into 8-bit pixmaps.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2694
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2695
  typedef enum  FT_Render_Mode_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2696
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2697
    FT_RENDER_MODE_NORMAL = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2698
    FT_RENDER_MODE_LIGHT,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2699
    FT_RENDER_MODE_MONO,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2700
    FT_RENDER_MODE_LCD,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2701
    FT_RENDER_MODE_LCD_V,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2702
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2703
    FT_RENDER_MODE_MAX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2704
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2705
  } FT_Render_Mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2706
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2707
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2708
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2709
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2710
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2711
  /*    ft_render_mode_xxx                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2712
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2713
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2714
  /*    These constants are deprecated.  Use the corresponding             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2715
  /*    @FT_Render_Mode values instead.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2716
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2717
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2718
  /*    ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2719
  /*    ft_render_mode_mono   :: see @FT_RENDER_MODE_MONO                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2720
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2721
#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2722
#define ft_render_mode_mono    FT_RENDER_MODE_MONO
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2723
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2724
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2725
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2726
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2727
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2728
  /*    FT_Render_Glyph                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2729
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2730
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2731
  /*    Convert a given glyph image to a bitmap.  It does so by inspecting */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2732
  /*    the glyph image format, finding the relevant renderer, and         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2733
  /*    invoking it.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2734
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2735
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2736
  /*    slot        :: A handle to the glyph slot containing the image to  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2737
  /*                   convert.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2738
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2739
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2740
  /*    render_mode :: This is the render mode used to render the glyph    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2741
  /*                   image into a bitmap.  See @FT_Render_Mode for a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2742
  /*                   list of possible values.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2743
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2744
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2745
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2746
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2747
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2748
  FT_Render_Glyph( FT_GlyphSlot    slot,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2749
                   FT_Render_Mode  render_mode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2750
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2751
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2752
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2753
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2754
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2755
  /*    FT_Kerning_Mode                                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2756
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2757
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2758
  /*    An enumeration used to specify which kerning values to return in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2759
  /*    @FT_Get_Kerning.                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2760
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2761
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2762
  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2763
  /*                           distances (value is~0).                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2764
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2765
  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2766
  /*                           distances.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2767
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2768
  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2769
  /*                           units.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2770
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2771
  typedef enum  FT_Kerning_Mode_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2772
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2773
    FT_KERNING_DEFAULT  = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2774
    FT_KERNING_UNFITTED,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2775
    FT_KERNING_UNSCALED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2776
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2777
  } FT_Kerning_Mode;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2778
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2779
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2780
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2781
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2782
  /* <Const>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2783
  /*    ft_kerning_default                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2784
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2785
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2786
  /*    This constant is deprecated.  Please use @FT_KERNING_DEFAULT       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2787
  /*    instead.                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2788
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2789
#define ft_kerning_default   FT_KERNING_DEFAULT
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2790
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2791
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2792
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2793
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2794
  /* <Const>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2795
  /*    ft_kerning_unfitted                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2796
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2797
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2798
  /*    This constant is deprecated.  Please use @FT_KERNING_UNFITTED      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2799
  /*    instead.                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2800
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2801
#define ft_kerning_unfitted  FT_KERNING_UNFITTED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2802
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2803
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2804
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2805
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2806
  /* <Const>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2807
  /*    ft_kerning_unscaled                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2808
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2809
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2810
  /*    This constant is deprecated.  Please use @FT_KERNING_UNSCALED      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2811
  /*    instead.                                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2812
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2813
#define ft_kerning_unscaled  FT_KERNING_UNSCALED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2814
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2815
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2816
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2817
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2818
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2819
  /*    FT_Get_Kerning                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2820
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2821
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2822
  /*    Return the kerning vector between two glyphs of a same face.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2823
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2824
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2825
  /*    face        :: A handle to a source face object.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2826
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2827
  /*    left_glyph  :: The index of the left glyph in the kern pair.       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2828
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2829
  /*    right_glyph :: The index of the right glyph in the kern pair.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2830
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2831
  /*    kern_mode   :: See @FT_Kerning_Mode for more information.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2832
  /*                   Determines the scale and dimension of the returned  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2833
  /*                   kerning vector.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2834
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2835
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2836
  /*    akerning    :: The kerning vector.  This is either in font units   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2837
  /*                   or in pixels (26.6 format) for scalable formats,    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2838
  /*                   and in pixels for fixed-sizes formats.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2839
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2840
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2841
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2842
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2843
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2844
  /*    Only horizontal layouts (left-to-right & right-to-left) are        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2845
  /*    supported by this method.  Other layouts, or more sophisticated    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2846
  /*    kernings, are out of the scope of this API function -- they can be */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2847
  /*    implemented through format-specific interfaces.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2848
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2849
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2850
  FT_Get_Kerning( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2851
                  FT_UInt     left_glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2852
                  FT_UInt     right_glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2853
                  FT_UInt     kern_mode,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2854
                  FT_Vector  *akerning );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2855
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2856
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2857
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2858
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2859
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2860
  /*    FT_Get_Track_Kerning                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2861
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2862
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2863
  /*    Return the track kerning for a given face object at a given size.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2864
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2865
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2866
  /*    face       :: A handle to a source face object.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2867
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2868
  /*    point_size :: The point size in 16.16 fractional points.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2869
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2870
  /*    degree     :: The degree of tightness.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2871
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2872
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2873
  /*    akerning   :: The kerning in 16.16 fractional points.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2874
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2875
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2876
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2877
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2878
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2879
  FT_Get_Track_Kerning( FT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2880
                        FT_Fixed   point_size,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2881
                        FT_Int     degree,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2882
                        FT_Fixed*  akerning );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2883
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2884
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2885
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2886
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2887
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2888
  /*    FT_Get_Glyph_Name                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2889
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2890
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2891
  /*    Retrieve the ASCII name of a given glyph in a face.  This only     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2892
  /*    works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2893
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2894
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2895
  /*    face        :: A handle to a source face object.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2896
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2897
  /*    glyph_index :: The glyph index.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2898
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2899
  /*    buffer_max  :: The maximal number of bytes available in the        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2900
  /*                   buffer.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2901
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2902
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2903
  /*    buffer      :: A pointer to a target buffer where the name is      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2904
  /*                   copied to.                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2905
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2906
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2907
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2908
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2909
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2910
  /*    An error is returned if the face doesn't provide glyph names or if */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2911
  /*    the glyph index is invalid.  In all cases of failure, the first    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2912
  /*    byte of `buffer' is set to~0 to indicate an empty name.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2913
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2914
  /*    The glyph name is truncated to fit within the buffer if it is too  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2915
  /*    long.  The returned string is always zero-terminated.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2916
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2917
  /*    This function is not compiled within the library if the config     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2918
  /*    macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2919
  /*    `include/freetype/config/ftoptions.h'.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2920
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2921
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2922
  FT_Get_Glyph_Name( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2923
                     FT_UInt     glyph_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2924
                     FT_Pointer  buffer,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2925
                     FT_UInt     buffer_max );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2926
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2927
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2928
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2929
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2930
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2931
  /*    FT_Get_Postscript_Name                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2932
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2933
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2934
  /*    Retrieve the ASCII PostScript name of a given face, if available.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2935
  /*    This only works with PostScript and TrueType fonts.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2936
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2937
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2938
  /*    face :: A handle to the source face object.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2939
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2940
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2941
  /*    A pointer to the face's PostScript name.  NULL if unavailable.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2942
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2943
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2944
  /*    The returned pointer is owned by the face and is destroyed with    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2945
  /*    it.                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2946
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2947
  FT_EXPORT( const char* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2948
  FT_Get_Postscript_Name( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2949
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2950
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2951
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2952
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2953
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2954
  /*    FT_Select_Charmap                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2955
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2956
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2957
  /*    Select a given charmap by its encoding tag (as listed in           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2958
  /*    `freetype.h').                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2959
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2960
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2961
  /*    face     :: A handle to the source face object.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2962
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2963
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2964
  /*    encoding :: A handle to the selected encoding.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2965
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2966
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2967
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2968
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2969
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2970
  /*    This function returns an error if no charmap in the face           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2971
  /*    corresponds to the encoding queried here.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2972
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2973
  /*    Because many fonts contain more than a single cmap for Unicode     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2974
  /*    encoding, this function has some special code to select the one    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2975
  /*    which covers Unicode best (`best' in the sense that a UCS-4 cmap   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2976
  /*    is preferred to a UCS-2 cmap).  It is thus preferable to           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2977
  /*    @FT_Set_Charmap in this case.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2978
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2979
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2980
  FT_Select_Charmap( FT_Face      face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2981
                     FT_Encoding  encoding );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2982
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2983
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2984
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2985
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2986
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2987
  /*    FT_Set_Charmap                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2988
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2989
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2990
  /*    Select a given charmap for character code to glyph index mapping.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2991
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2992
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2993
  /*    face    :: A handle to the source face object.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2994
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2995
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2996
  /*    charmap :: A handle to the selected charmap.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2997
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2998
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  2999
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3000
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3001
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3002
  /*    This function returns an error if the charmap is not part of       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3003
  /*    the face (i.e., if it is not listed in the `face->charmaps'        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3004
  /*    table).                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3005
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3006
  /*    It also fails if a type~14 charmap is selected.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3007
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3008
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3009
  FT_Set_Charmap( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3010
                  FT_CharMap  charmap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3011
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3012
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3013
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3014
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3015
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3016
   *   FT_Get_Charmap_Index
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3017
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3018
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3019
   *   Retrieve index of a given charmap.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3020
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3021
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3022
   *   charmap ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3023
   *     A handle to a charmap.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3024
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3025
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3026
   *   The index into the array of character maps within the face to which
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3027
   *   `charmap' belongs.  If an error occurs, -1 is returned.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3028
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3029
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3030
  FT_EXPORT( FT_Int )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3031
  FT_Get_Charmap_Index( FT_CharMap  charmap );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3032
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3033
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3034
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3035
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3036
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3037
  /*    FT_Get_Char_Index                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3038
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3039
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3040
  /*    Return the glyph index of a given character code.  This function   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3041
  /*    uses a charmap object to do the mapping.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3042
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3043
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3044
  /*    face     :: A handle to the source face object.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3045
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3046
  /*    charcode :: The character code.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3047
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3048
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3049
  /*    The glyph index.  0~means `undefined character code'.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3050
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3051
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3052
  /*    If you use FreeType to manipulate the contents of font files       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3053
  /*    directly, be aware that the glyph index returned by this function  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3054
  /*    doesn't always correspond to the internal indices used within      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3055
  /*    the file.  This is done to ensure that value~0 always corresponds  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3056
  /*    to the `missing glyph'.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3057
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3058
  FT_EXPORT( FT_UInt )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3059
  FT_Get_Char_Index( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3060
                     FT_ULong  charcode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3061
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3062
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3063
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3064
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3065
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3066
  /*    FT_Get_First_Char                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3067
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3068
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3069
  /*    This function is used to return the first character code in the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3070
  /*    current charmap of a given face.  It also returns the              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3071
  /*    corresponding glyph index.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3072
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3073
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3074
  /*    face    :: A handle to the source face object.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3075
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3076
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3077
  /*    agindex :: Glyph index of first character code.  0~if charmap is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3078
  /*               empty.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3079
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3080
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3081
  /*    The charmap's first character code.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3082
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3083
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3084
  /*    You should use this function with @FT_Get_Next_Char to be able to  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3085
  /*    parse all character codes available in a given charmap.  The code  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3086
  /*    should look like this:                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3087
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3088
  /*    {                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3089
  /*      FT_ULong  charcode;                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3090
  /*      FT_UInt   gindex;                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3091
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3092
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3093
  /*      charcode = FT_Get_First_Char( face, &gindex );                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3094
  /*      while ( gindex != 0 )                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3095
  /*      {                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3096
  /*        ... do something with (charcode,gindex) pair ...               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3097
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3098
  /*        charcode = FT_Get_Next_Char( face, charcode, &gindex );        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3099
  /*      }                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3100
  /*    }                                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3101
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3102
  /*    Note that `*agindex' is set to~0 if the charmap is empty.  The     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3103
  /*    result itself can be~0 in two cases: if the charmap is empty or    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3104
  /*    if the value~0 is the first valid character code.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3105
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3106
  FT_EXPORT( FT_ULong )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3107
  FT_Get_First_Char( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3108
                     FT_UInt  *agindex );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3109
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3110
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3111
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3112
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3113
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3114
  /*    FT_Get_Next_Char                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3115
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3116
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3117
  /*    This function is used to return the next character code in the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3118
  /*    current charmap of a given face following the value `char_code',   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3119
  /*    as well as the corresponding glyph index.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3120
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3121
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3122
  /*    face      :: A handle to the source face object.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3123
  /*    char_code :: The starting character code.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3124
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3125
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3126
  /*    agindex   :: Glyph index of next character code.  0~if charmap     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3127
  /*                 is empty.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3129
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3130
  /*    The charmap's next character code.                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3131
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3132
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3133
  /*    You should use this function with @FT_Get_First_Char to walk       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3134
  /*    over all character codes available in a given charmap.  See the    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3135
  /*    note for this function for a simple code example.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3136
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3137
  /*    Note that `*agindex' is set to~0 when there are no more codes in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3138
  /*    the charmap.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3139
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3140
  FT_EXPORT( FT_ULong )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3141
  FT_Get_Next_Char( FT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3142
                    FT_ULong   char_code,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3143
                    FT_UInt   *agindex );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3144
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3145
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3146
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3147
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3148
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3149
  /*    FT_Get_Name_Index                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3150
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3151
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3152
  /*    Return the glyph index of a given glyph name.  This function uses  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3153
  /*    driver specific objects to do the translation.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3154
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3155
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3156
  /*    face       :: A handle to the source face object.                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3157
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3158
  /*    glyph_name :: The glyph name.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3159
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3160
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3161
  /*    The glyph index.  0~means `undefined character code'.              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3162
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3163
  FT_EXPORT( FT_UInt )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3164
  FT_Get_Name_Index( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3165
                     FT_String*  glyph_name );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3167
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3168
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3169
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3170
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3171
   *   FT_SUBGLYPH_FLAG_XXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3172
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3173
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3174
   *   A list of constants used to describe subglyphs.  Please refer to the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3175
   *   TrueType specification for the meaning of the various flags.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3176
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3177
   * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3178
   *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3179
   *   FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3180
   *   FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3181
   *   FT_SUBGLYPH_FLAG_SCALE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3182
   *   FT_SUBGLYPH_FLAG_XY_SCALE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3183
   *   FT_SUBGLYPH_FLAG_2X2 ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3184
   *   FT_SUBGLYPH_FLAG_USE_MY_METRICS ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3185
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3186
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3187
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3188
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3189
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3190
#define FT_SUBGLYPH_FLAG_SCALE                   8
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3191
#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3192
#define FT_SUBGLYPH_FLAG_2X2                  0x80
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3193
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3194
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3195
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3196
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3197
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3198
   * @func:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3199
   *   FT_Get_SubGlyph_Info
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3200
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3201
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3202
   *   Retrieve a description of a given subglyph.  Only use it if
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3203
   *   `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3204
   *   returned otherwise.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3205
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3206
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3207
   *   glyph ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3208
   *     The source glyph slot.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3209
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3210
   *   sub_index ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3211
   *     The index of the subglyph.  Must be less than
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3212
   *     `glyph->num_subglyphs'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3213
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3214
   * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3215
   *   p_index ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3216
   *     The glyph index of the subglyph.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3217
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3218
   *   p_flags ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3219
   *     The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3220
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3221
   *   p_arg1 ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3222
   *     The subglyph's first argument (if any).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3223
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3224
   *   p_arg2 ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3225
   *     The subglyph's second argument (if any).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3226
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3227
   *   p_transform ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3228
   *     The subglyph transformation (if any).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3229
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3230
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3231
   *   FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3232
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3233
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3234
   *   The values of `*p_arg1', `*p_arg2', and `*p_transform' must be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3235
   *   interpreted depending on the flags returned in `*p_flags'.  See the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3236
   *   TrueType specification for details.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3237
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3238
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3239
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3240
  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3241
                        FT_UInt       sub_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3242
                        FT_Int       *p_index,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3243
                        FT_UInt      *p_flags,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3244
                        FT_Int       *p_arg1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3245
                        FT_Int       *p_arg2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3246
                        FT_Matrix    *p_transform );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3247
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3248
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3249
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3250
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3251
  /* <Enum>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3252
  /*    FT_FSTYPE_XXX                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3253
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3254
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3255
  /*    A list of bit flags used in the `fsType' field of the OS/2 table   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3256
  /*    in a TrueType or OpenType font and the `FSType' entry in a         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3257
  /*    PostScript font.  These bit flags are returned by                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3258
  /*    @FT_Get_FSType_Flags; they inform client applications of embedding */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3259
  /*    and subsetting restrictions associated with a font.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3260
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3261
  /*    See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3262
  /*    more details.                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3263
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3264
  /* <Values>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3265
  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING ::                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3266
  /*      Fonts with no fsType bit set may be embedded and permanently     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3267
  /*      installed on the remote system by an application.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3268
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3269
  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING ::                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3270
  /*      Fonts that have only this bit set must not be modified, embedded */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3271
  /*      or exchanged in any manner without first obtaining permission of */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3272
  /*      the font software copyright owner.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3273
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3274
  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3275
  /*      If this bit is set, the font may be embedded and temporarily     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3276
  /*      loaded on the remote system.  Documents containing Preview &     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3277
  /*      Print fonts must be opened `read-only'; no edits can be applied  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3278
  /*      to the document.                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3279
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3280
  /*    FT_FSTYPE_EDITABLE_EMBEDDING ::                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3281
  /*      If this bit is set, the font may be embedded but must only be    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3282
  /*      installed temporarily on other systems.  In contrast to Preview  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3283
  /*      & Print fonts, documents containing editable fonts may be opened */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3284
  /*      for reading, editing is permitted, and changes may be saved.     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3285
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3286
  /*    FT_FSTYPE_NO_SUBSETTING ::                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3287
  /*      If this bit is set, the font may not be subsetted prior to       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3288
  /*      embedding.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3289
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3290
  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3291
  /*      If this bit is set, only bitmaps contained in the font may be    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3292
  /*      embedded; no outline data may be embedded.  If there are no      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3293
  /*      bitmaps available in the font, then the font is unembeddable.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3294
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3295
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3296
  /*    While the fsType flags can indicate that a font may be embedded, a */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3297
  /*    license with the font vendor may be separately required to use the */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3298
  /*    font in this way.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3299
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3300
#define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3301
#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3302
#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3303
#define FT_FSTYPE_EDITABLE_EMBEDDING            0x0008
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3304
#define FT_FSTYPE_NO_SUBSETTING                 0x0100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3305
#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3306
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3307
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3308
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3309
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3310
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3311
  /*    FT_Get_FSType_Flags                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3312
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3313
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3314
  /*    Return the fsType flags for a font.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3315
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3316
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3317
  /*    face :: A handle to the source face object.                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3318
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3319
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3320
  /*    The fsType flags, @FT_FSTYPE_XXX.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3321
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3322
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3323
  /*    Use this function rather than directly reading the `fs_type' field */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3324
  /*    in the @PS_FontInfoRec structure which is only guaranteed to       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3325
  /*    return the correct results for Type~1 fonts.                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3326
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3327
  FT_EXPORT( FT_UShort )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3328
  FT_Get_FSType_Flags( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3329
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3330
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3331
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3332
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3333
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3334
  /*    glyph_variants                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3335
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3336
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3337
  /*    Glyph Variants                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3338
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3339
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3340
  /*    The FreeType~2 interface to Unicode Ideographic Variation          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3341
  /*    Sequences (IVS), using the SFNT cmap format~14.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3342
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3343
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3344
  /*    Many CJK characters have variant forms.  They are a sort of grey   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3345
  /*    area somewhere between being totally irrelevant and semantically   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3346
  /*    distinct; for this reason, the Unicode consortium decided to       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3347
  /*    introduce Ideographic Variation Sequences (IVS), consisting of a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3348
  /*    Unicode base character and one of 240 variant selectors            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3349
  /*    (U+E0100-U+E01EF), instead of further extending the already huge   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3350
  /*    code range for CJK characters.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3351
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3352
  /*    An IVS is registered and unique; for further details please refer  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3353
  /*    to Unicode Technical Report #37, the Ideographic Variation         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3354
  /*    Database.  To date (October 2007), the character with the most     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3355
  /*    variants is U+908A, having 8~such IVS.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3356
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3357
  /*    Adobe and MS decided to support IVS with a new cmap subtable       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3358
  /*    (format~14).  It is an odd subtable because it is not a mapping of */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3359
  /*    input code points to glyphs, but contains lists of all variants    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3360
  /*    supported by the font.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3361
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3362
  /*    A variant may be either `default' or `non-default'.  A default     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3363
  /*    variant is the one you will get for that code point if you look it */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3364
  /*    up in the standard Unicode cmap.  A non-default variant is a       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3365
  /*    different glyph.                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3366
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3367
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3368
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3369
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3370
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3371
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3372
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3373
  /*    FT_Face_GetCharVariantIndex                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3374
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3375
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3376
  /*    Return the glyph index of a given character code as modified by    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3377
  /*    the variation selector.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3378
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3379
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3380
  /*    face ::                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3381
  /*      A handle to the source face object.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3382
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3383
  /*    charcode ::                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3384
  /*      The character code point in Unicode.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3385
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3386
  /*    variantSelector ::                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3387
  /*      The Unicode code point of the variation selector.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3388
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3389
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3390
  /*    The glyph index.  0~means either `undefined character code', or    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3391
  /*    `undefined selector code', or `no variation selector cmap          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3392
  /*    subtable', or `current CharMap is not Unicode'.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3393
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3394
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3395
  /*    If you use FreeType to manipulate the contents of font files       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3396
  /*    directly, be aware that the glyph index returned by this function  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3397
  /*    doesn't always correspond to the internal indices used within      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3398
  /*    the file.  This is done to ensure that value~0 always corresponds  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3399
  /*    to the `missing glyph'.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3400
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3401
  /*    This function is only meaningful if                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3402
  /*      a) the font has a variation selector cmap sub table,             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3403
  /*    and                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3404
  /*      b) the current charmap has a Unicode encoding.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3405
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3406
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3407
  /*    2.3.6                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3408
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3409
  FT_EXPORT( FT_UInt )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3410
  FT_Face_GetCharVariantIndex( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3411
                               FT_ULong  charcode,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3412
                               FT_ULong  variantSelector );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3413
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3414
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3415
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3416
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3417
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3418
  /*    FT_Face_GetCharVariantIsDefault                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3419
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3420
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3421
  /*    Check whether this variant of this Unicode character is the one to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3422
  /*    be found in the `cmap'.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3423
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3424
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3425
  /*    face ::                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3426
  /*      A handle to the source face object.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3427
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3428
  /*    charcode ::                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3429
  /*      The character codepoint in Unicode.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3430
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3431
  /*    variantSelector ::                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3432
  /*      The Unicode codepoint of the variation selector.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3433
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3434
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3435
  /*    1~if found in the standard (Unicode) cmap, 0~if found in the       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3436
  /*    variation selector cmap, or -1 if it is not a variant.             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3437
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3438
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3439
  /*    This function is only meaningful if the font has a variation       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3440
  /*    selector cmap subtable.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3441
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3442
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3443
  /*    2.3.6                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3444
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3445
  FT_EXPORT( FT_Int )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3446
  FT_Face_GetCharVariantIsDefault( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3447
                                   FT_ULong  charcode,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3448
                                   FT_ULong  variantSelector );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3449
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3450
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3451
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3452
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3453
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3454
  /*    FT_Face_GetVariantSelectors                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3455
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3456
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3457
  /*    Return a zero-terminated list of Unicode variant selectors found   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3458
  /*    in the font.                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3459
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3460
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3461
  /*    face ::                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3462
  /*      A handle to the source face object.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3463
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3464
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3465
  /*    A pointer to an array of selector code points, or NULL if there is */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3466
  /*    no valid variant selector cmap subtable.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3467
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3468
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3469
  /*    The last item in the array is~0; the array is owned by the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3470
  /*    @FT_Face object but can be overwritten or released on the next     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3471
  /*    call to a FreeType function.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3472
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3473
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3474
  /*    2.3.6                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3475
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3476
  FT_EXPORT( FT_UInt32* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3477
  FT_Face_GetVariantSelectors( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3478
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3479
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3480
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3481
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3482
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3483
  /*    FT_Face_GetVariantsOfChar                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3484
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3485
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3486
  /*    Return a zero-terminated list of Unicode variant selectors found   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3487
  /*    for the specified character code.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3488
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3489
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3490
  /*    face ::                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3491
  /*      A handle to the source face object.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3492
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3493
  /*    charcode ::                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3494
  /*      The character codepoint in Unicode.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3495
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3496
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3497
  /*    A pointer to an array of variant selector code points which are    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3498
  /*    active for the given character, or NULL if the corresponding list  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3499
  /*    is empty.                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3500
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3501
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3502
  /*    The last item in the array is~0; the array is owned by the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3503
  /*    @FT_Face object but can be overwritten or released on the next     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3504
  /*    call to a FreeType function.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3505
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3506
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3507
  /*    2.3.6                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3508
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3509
  FT_EXPORT( FT_UInt32* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3510
  FT_Face_GetVariantsOfChar( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3511
                             FT_ULong  charcode );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3512
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3513
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3514
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3515
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3516
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3517
  /*    FT_Face_GetCharsOfVariant                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3518
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3519
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3520
  /*    Return a zero-terminated list of Unicode character codes found for */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3521
  /*    the specified variant selector.                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3522
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3523
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3524
  /*    face ::                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3525
  /*      A handle to the source face object.                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3526
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3527
  /*    variantSelector ::                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3528
  /*      The variant selector code point in Unicode.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3529
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3530
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3531
  /*    A list of all the code points which are specified by this selector */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3532
  /*    (both default and non-default codes are returned) or NULL if there */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3533
  /*    is no valid cmap or the variant selector is invalid.               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3534
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3535
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3536
  /*    The last item in the array is~0; the array is owned by the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3537
  /*    @FT_Face object but can be overwritten or released on the next     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3538
  /*    call to a FreeType function.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3539
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3540
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3541
  /*    2.3.6                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3542
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3543
  FT_EXPORT( FT_UInt32* )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3544
  FT_Face_GetCharsOfVariant( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3545
                             FT_ULong  variantSelector );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3546
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3547
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3548
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3549
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3550
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3551
  /*    computations                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3552
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3553
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3554
  /*    Computations                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3555
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3556
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3557
  /*    Crunching fixed numbers and vectors.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3558
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3559
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3560
  /*    This section contains various functions used to perform            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3561
  /*    computations on 16.16 fixed-float numbers or 2d vectors.           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3562
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3563
  /* <Order>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3564
  /*    FT_MulDiv                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3565
  /*    FT_MulFix                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3566
  /*    FT_DivFix                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3567
  /*    FT_RoundFix                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3568
  /*    FT_CeilFix                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3569
  /*    FT_FloorFix                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3570
  /*    FT_Vector_Transform                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3571
  /*    FT_Matrix_Multiply                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3572
  /*    FT_Matrix_Invert                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3573
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3574
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3575
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3576
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3577
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3578
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3579
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3580
  /*    FT_MulDiv                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3581
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3582
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3583
  /*    A very simple function used to perform the computation `(a*b)/c'   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3584
  /*    with maximal accuracy (it uses a 64-bit intermediate integer       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3585
  /*    whenever necessary).                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3586
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3587
  /*    This function isn't necessarily as fast as some processor specific */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3588
  /*    operations, but is at least completely portable.                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3589
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3590
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3591
  /*    a :: The first multiplier.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3592
  /*    b :: The second multiplier.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3593
  /*    c :: The divisor.                                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3594
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3595
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3596
  /*    The result of `(a*b)/c'.  This function never traps when trying to */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3597
  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3598
  /*    on the signs of `a' and `b'.                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3599
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3600
  FT_EXPORT( FT_Long )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3601
  FT_MulDiv( FT_Long  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3602
             FT_Long  b,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3603
             FT_Long  c );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3604
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3605
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3606
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3607
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3608
  /* The following #if 0 ... #endif is for the documentation formatter, */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3609
  /* hiding the internal `FT_MULFIX_INLINED' macro.                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3610
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3611
#if 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3612
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3613
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3614
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3615
  /*    FT_MulFix                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3616
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3617
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3618
  /*    A very simple function used to perform the computation             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3619
  /*    `(a*b)/0x10000' with maximal accuracy.  Most of the time this is   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3620
  /*    used to multiply a given value by a 16.16 fixed float factor.      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3621
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3622
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3623
  /*    a :: The first multiplier.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3624
  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3625
  /*         possible (see note below).                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3626
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3627
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3628
  /*    The result of `(a*b)/0x10000'.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3629
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3630
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3631
  /*    This function has been optimized for the case where the absolute   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3632
  /*    value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3633
  /*    As this happens mainly when scaling from notional units to         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3634
  /*    fractional pixels in FreeType, it resulted in noticeable speed     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3635
  /*    improvements between versions 2.x and 1.x.                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3636
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3637
  /*    As a conclusion, always try to place a 16.16 factor as the         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3638
  /*    _second_ argument of this function; this can make a great          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3639
  /*    difference.                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3640
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3641
  FT_EXPORT( FT_Long )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3642
  FT_MulFix( FT_Long  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3643
             FT_Long  b );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3644
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3645
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3646
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3647
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3648
#ifdef FT_MULFIX_INLINED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3649
#define FT_MulFix( a, b )  FT_MULFIX_INLINED( a, b )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3650
#else
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3651
  FT_EXPORT( FT_Long )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3652
  FT_MulFix( FT_Long  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3653
             FT_Long  b );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3654
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3655
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3656
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3657
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3658
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3659
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3660
  /*    FT_DivFix                                                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3661
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3662
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3663
  /*    A very simple function used to perform the computation             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3664
  /*    `(a*0x10000)/b' with maximal accuracy.  Most of the time, this is  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3665
  /*    used to divide a given value by a 16.16 fixed float factor.        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3666
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3667
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3668
  /*    a :: The first multiplier.                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3669
  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3670
  /*         possible (see note below).                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3671
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3672
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3673
  /*    The result of `(a*0x10000)/b'.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3674
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3675
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3676
  /*    The optimization for FT_DivFix() is simple: If (a~<<~16) fits in   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3677
  /*    32~bits, then the division is computed directly.  Otherwise, we    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3678
  /*    use a specialized version of @FT_MulDiv.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3679
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3680
  FT_EXPORT( FT_Long )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3681
  FT_DivFix( FT_Long  a,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3682
             FT_Long  b );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3683
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3684
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3685
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3686
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3687
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3688
  /*    FT_RoundFix                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3689
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3690
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3691
  /*    A very simple function used to round a 16.16 fixed number.         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3692
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3693
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3694
  /*    a :: The number to be rounded.                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3695
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3696
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3697
  /*    The result of `(a + 0x8000) & -0x10000'.                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3698
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3699
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3700
  FT_RoundFix( FT_Fixed  a );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3701
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3702
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3703
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3704
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3705
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3706
  /*    FT_CeilFix                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3707
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3708
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3709
  /*    A very simple function used to compute the ceiling function of a   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3710
  /*    16.16 fixed number.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3711
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3712
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3713
  /*    a :: The number for which the ceiling function is to be computed.  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3714
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3715
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3716
  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3717
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3718
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3719
  FT_CeilFix( FT_Fixed  a );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3720
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3721
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3722
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3723
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3724
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3725
  /*    FT_FloorFix                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3726
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3727
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3728
  /*    A very simple function used to compute the floor function of a     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3729
  /*    16.16 fixed number.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3730
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3731
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3732
  /*    a :: The number for which the floor function is to be computed.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3733
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3734
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3735
  /*    The result of `a & -0x10000'.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3736
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3737
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3738
  FT_FloorFix( FT_Fixed  a );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3739
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3740
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3741
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3742
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3743
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3744
  /*    FT_Vector_Transform                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3745
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3746
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3747
  /*    Transform a single vector through a 2x2 matrix.                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3748
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3749
  /* <InOut>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3750
  /*    vector :: The target vector to transform.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3751
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3752
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3753
  /*    matrix :: A pointer to the source 2x2 matrix.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3754
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3755
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3756
  /*    The result is undefined if either `vector' or `matrix' is invalid. */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3757
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3758
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3759
  FT_Vector_Transform( FT_Vector*        vec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3760
                       const FT_Matrix*  matrix );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3761
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3762
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3763
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3764
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3765
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3766
  /*    version                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3767
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3768
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3769
  /*    FreeType Version                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3770
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3771
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3772
  /*    Functions and macros related to FreeType versions.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3773
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3774
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3775
  /*    Note that those functions and macros are of limited use because    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3776
  /*    even a new release of FreeType with only documentation changes     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3777
  /*    increases the version number.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3778
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3779
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3780
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3781
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3782
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3783
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3784
   * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3785
   *   FREETYPE_XXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3786
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3787
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3788
   *   These three macros identify the FreeType source code version.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3789
   *   Use @FT_Library_Version to access them at runtime.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3790
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3791
   * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3792
   *   FREETYPE_MAJOR :: The major version number.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3793
   *   FREETYPE_MINOR :: The minor version number.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3794
   *   FREETYPE_PATCH :: The patch level.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3795
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3796
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3797
   *   The version number of FreeType if built as a dynamic link library
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3798
   *   with the `libtool' package is _not_ controlled by these three
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3799
   *   macros.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3800
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3801
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3802
#define FREETYPE_MAJOR  2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3803
#define FREETYPE_MINOR  4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3804
#define FREETYPE_PATCH  4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3805
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3806
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3807
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3808
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3809
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3810
  /*    FT_Library_Version                                                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3811
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3812
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3813
  /*    Return the version of the FreeType library being used.  This is    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3814
  /*    useful when dynamically linking to the library, since one cannot   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3815
  /*    use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3816
  /*    @FREETYPE_PATCH.                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3817
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3818
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3819
  /*    library :: A source library handle.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3820
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3821
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3822
  /*    amajor  :: The major version number.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3823
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3824
  /*    aminor  :: The minor version number.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3825
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3826
  /*    apatch  :: The patch version number.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3827
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3828
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3829
  /*    The reason why this function takes a `library' argument is because */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3830
  /*    certain programs implement library initialization in a custom way  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3831
  /*    that doesn't use @FT_Init_FreeType.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3832
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3833
  /*    In such cases, the library version might not be available before   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3834
  /*    the library object has been created.                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3835
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3836
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3837
  FT_Library_Version( FT_Library   library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3838
                      FT_Int      *amajor,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3839
                      FT_Int      *aminor,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3840
                      FT_Int      *apatch );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3841
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3842
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3843
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3844
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3845
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3846
  /*    FT_Face_CheckTrueTypePatents                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3847
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3848
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3849
  /*    Parse all bytecode instructions of a TrueType font file to check   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3850
  /*    whether any of the patented opcodes are used.  This is only useful */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3851
  /*    if you want to be able to use the unpatented hinter with           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3852
  /*    fonts that do *not* use these opcodes.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3853
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3854
  /*    Note that this function parses *all* glyph instructions in the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3855
  /*    font file, which may be slow.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3856
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3857
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3858
  /*    face :: A face handle.                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3859
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3860
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3861
  /*    1~if this is a TrueType font that uses one of the patented         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3862
  /*    opcodes, 0~otherwise.                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3863
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3864
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3865
  /*    Since May 2010, TrueType hinting is no longer patented.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3866
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3867
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3868
  /*    2.3.5                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3869
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3870
  FT_EXPORT( FT_Bool )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3871
  FT_Face_CheckTrueTypePatents( FT_Face  face );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3872
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3873
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3874
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3875
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3876
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3877
  /*    FT_Face_SetUnpatentedHinting                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3878
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3879
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3880
  /*    Enable or disable the unpatented hinter for a given face.          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3881
  /*    Only enable it if you have determined that the face doesn't        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3882
  /*    use any patented opcodes (see @FT_Face_CheckTrueTypePatents).      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3883
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3884
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3885
  /*    face  :: A face handle.                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3886
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3887
  /*    value :: New boolean setting.                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3888
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3889
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3890
  /*    The old setting value.  This will always be false if this is not   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3891
  /*    an SFNT font, or if the unpatented hinter is not compiled in this  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3892
  /*    instance of the library.                                           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3893
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3894
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3895
  /*    Since May 2010, TrueType hinting is no longer patented.            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3896
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3897
  /* <Since>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3898
  /*    2.3.5                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3899
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3900
  FT_EXPORT( FT_Bool )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3901
  FT_Face_SetUnpatentedHinting( FT_Face  face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3902
                                FT_Bool  value );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3903
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3904
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3905
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3906
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3907
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3908
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3909
#endif /* __FREETYPE_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3910
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3911
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
  3912
/* END */