misc/libfreetype/include/freetype/ftsizes.h
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftsizes.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 size objects management (specification).                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 1996-2001, 2003, 2004, 2006, 2009 by                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
  /* Typical application would normally not need to use these functions.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
  /* However, they have been placed in a public API for the rare cases     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
  /* where they are needed.                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
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 __FTSIZES_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#define __FTSIZES_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_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
#endif
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
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /*    sizes_management                                                   */
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
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
  /*    Size Management                                                    */
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
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  /*    Managing multiple sizes per face.                                  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  /*    When creating a new face object (e.g., with @FT_New_Face), an      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  /*    @FT_Size object is automatically created and used to store all     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  /*    pixel-size dependent information, available in the `face->size'    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
  /*    field.                                                             */
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
  /*    It is however possible to create more sizes for a given face,      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
  /*    mostly in order to manage several character pixel sizes of the     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  /*    same font family and style.  See @FT_New_Size and @FT_Done_Size.   */
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
  /*    Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  /*    modify the contents of the current `active' size; you thus need    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
  /*    to use @FT_Activate_Size to change it.                             */
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
  /*    99% of applications won't need the functions provided here,        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
  /*    especially if they use the caching sub-system, so be cautious      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
  /*    when using these.                                                  */
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
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
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  /*    FT_New_Size                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  /*    Create a new size object from a given face object.                 */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  /*    face :: A handle to a parent face object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  /* <Output>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  /*    asize :: A handle to a new size object.                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
  /*    FreeType error code.  0~means success.                             */
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
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  /*    You need to call @FT_Activate_Size in order to select the new size */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
  /*    for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
  /*    @FT_Load_Glyph, @FT_Load_Char, etc.                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
  FT_New_Size( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
               FT_Size*  size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  /*    FT_Done_Size                                                       */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
  /*    Discard a given size object.  Note that @FT_Done_Face              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
  /*    automatically discards all size objects allocated with             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
  /*    @FT_New_Size.                                                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  /*    size :: A handle to a target size object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  FT_Done_Size( FT_Size  size );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  /* <Function>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*    FT_Activate_Size                                                   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
  /*    Even though it is possible to create several size objects for a    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
  /*    given face (see @FT_New_Size for details), functions like          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
  /*    @FT_Load_Glyph or @FT_Load_Char only use the one which has been    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
  /*    activated last to determine the `current character pixel size'.    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
  /*    This function can be used to `activate' a previously created size  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  /*    object.                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  /* <Input>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  /*    size :: A handle to a target size object.                          */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  /* <Return>                                                              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  /*    FreeType error code.  0~means success.                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
  /* <Note>                                                                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  /*    If `face' is the size's parent face object, this function changes  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  /*    the value of `face->size' to the input size handle.                */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  FT_Activate_Size( FT_Size  size );
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
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
#endif /* __FTSIZES_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
/* END */