misc/libfreetype/include/freetype/ftpfr.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
/*  ftpfr.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 API for accessing PFR-specific data (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 2002, 2003, 2004, 2006, 2008, 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
#ifndef __FTPFR_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTPFR_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  /*    pfr_fonts                                                          */
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
  /* <Title>                                                               */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
  /*    PFR Fonts                                                          */
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
  /* <Abstract>                                                            */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  /*    PFR/TrueDoc specific API.                                          */
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
  /* <Description>                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
  /*    This section contains the declaration of PFR-specific functions.   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
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
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  *    FT_Get_PFR_Metrics
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
  *    Return the outline and metrics resolutions of a given PFR face.
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
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
  *    face :: Handle to the input face.  It can be a non-PFR face.
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
  * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
  *    aoutline_resolution ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
  *      Outline resolution.  This is equivalent to `face->units_per_EM'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
  *      for non-PFR fonts.  Optional (parameter can be NULL).
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
  *    ametrics_resolution ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
  *      Metrics resolution.  This is equivalent to `outline_resolution'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
  *      for non-PFR fonts.  Optional (parameter can be NULL).
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
  *    ametrics_x_scale ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
  *      A 16.16 fixed-point number used to scale distance expressed
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
  *      in metrics units to device sub-pixels.  This is equivalent to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
  *      `face->size->x_scale', but for metrics only.  Optional (parameter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
  *      can be NULL).
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
  *    ametrics_y_scale ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  *      Same as `ametrics_x_scale' but for the vertical direction.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
  *      optional (parameter can be NULL).
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
  * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
  *    FreeType error code.  0~means success.
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
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
  *   If the input face is not a PFR, this function will return an error.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
  *   However, in all cases, it will return valid values.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
  FT_Get_PFR_Metrics( FT_Face    face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
                      FT_UInt   *aoutline_resolution,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
                      FT_UInt   *ametrics_resolution,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
                      FT_Fixed  *ametrics_x_scale,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
                      FT_Fixed  *ametrics_y_scale );
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
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
 /**********************************************************************
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
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
  *    FT_Get_PFR_Kerning
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  *    Return the kerning pair corresponding to two glyphs in a PFR face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
  *    The distance is expressed in metrics units, unlike the result of
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
  *    @FT_Get_Kerning.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
  *    face  :: A handle to the input face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
  *    left  :: Index of the left glyph.
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
  *    right :: Index of the right glyph.
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
  * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
  *    avector :: A kerning vector.
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
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
  *    This function always return distances in original PFR metrics
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
  *    units.  This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  *    mode, which always returns distances converted to outline units.
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
  *    You can use the value of the `x_scale' and `y_scale' parameters
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
  *    returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
  FT_Get_PFR_Kerning( FT_Face     face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
                      FT_UInt     left,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
                      FT_UInt     right,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
                      FT_Vector  *avector );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
 /**********************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
  * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
  *    FT_Get_PFR_Advance
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
  * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
  *    Return a given glyph advance, expressed in original metrics units,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
  *    from a PFR font.
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
  * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
  *    face   :: A handle to the input face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  *    gindex :: The glyph index.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
  * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
  *    aadvance :: The glyph advance in metrics units.
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
  * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
  *    FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
  *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
  * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
  *    You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
  *    to convert the advance to device sub-pixels (i.e., 1/64th of pixels).
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
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
  FT_Get_PFR_Advance( FT_Face   face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
                      FT_UInt   gindex,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
                      FT_Pos   *aadvance );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
 /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
#endif /* __FTPFR_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
/* END */