misc/libfreetype/include/freetype/ftgasp.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
/*  ftgasp.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
/*    Access of TrueType's `gasp' table (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 2007, 2008, 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_GASP_H_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define _FT_GASP_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
  /***************************************************************************
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
   * @section:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
   *   gasp_table
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
   * @title:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
   *   Gasp Table
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
   * @abstract:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
   *   Retrieving TrueType `gasp' table entries.
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
   *   font for specific entries in its `gasp' table, if any.  This is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
   *   mainly useful when implementing native TrueType hinting with the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
   *   bytecode interpreter to duplicate the Windows text rendering results.
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
   * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
   *   FT_GASP_XXX
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
   *   A list of values and/or bit-flags returned by the @FT_Get_Gasp
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
   *   function.
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
   * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
   *   FT_GASP_NO_TABLE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
   *     This special value means that there is no GASP table in this face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
   *     It is up to the client to decide what to do.
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
   *   FT_GASP_DO_GRIDFIT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
   *     Grid-fitting and hinting should be performed at the specified ppem. 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
   *     This *really* means TrueType bytecode interpretation.  If this bit
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
   *     is not set, no hinting gets applied.
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
   *   FT_GASP_DO_GRAY ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
   *     Anti-aliased rendering should be performed at the specified ppem. 
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
   *     If not set, do monochrome rendering.
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
   *   FT_GASP_SYMMETRIC_SMOOTHING ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
   *     If set, smoothing along multiple axes must be used with ClearType.
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
   *   FT_GASP_SYMMETRIC_GRIDFIT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
   *     Grid-fitting must be used with ClearType's symmetric smoothing.
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
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
   *   The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
   *   used for standard font rasterization only.  Independently of that,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
   *   `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
   *   be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
   *   `FT_GASP_DO_GRAY' are consequently ignored).
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
   *   `ClearType' is Microsoft's implementation of LCD rendering, partly
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
   *   protected by patents.
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
   * @since:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
   *   2.3.0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
#define FT_GASP_NO_TABLE               -1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
#define FT_GASP_DO_GRIDFIT           0x01
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
#define FT_GASP_DO_GRAY              0x02
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
#define FT_GASP_SYMMETRIC_SMOOTHING  0x08
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
#define FT_GASP_SYMMETRIC_GRIDFIT    0x10
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
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
   * @func:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
   *   FT_Get_Gasp
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
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
   *   Read the `gasp' table from a TrueType or OpenType font file and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
   *   return the entry corresponding to a given character pixel size.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
   *   face :: The source face handle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
   *   ppem :: The vertical character pixel size.
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
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
   *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
   *   `gasp' table in the face.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
   * @since:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
   *   2.3.0
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_EXPORT( FT_Int )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
  FT_Get_Gasp( FT_Face  face,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
               FT_UInt  ppem );
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
#endif /* _FT_GASP_H_ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
/* END */