vrshoot

diff libs/ft2static/freetype/ftgasp.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/ft2static/freetype/ftgasp.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,120 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  ftgasp.h                                                               */
     1.7 +/*                                                                         */
     1.8 +/*    Access of TrueType's `gasp' table (specification).                   */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 2007, 2008 by                                                */
    1.11 +/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
    1.12 +/*                                                                         */
    1.13 +/*  This file is part of the FreeType project, and may only be used,       */
    1.14 +/*  modified, and distributed under the terms of the FreeType project      */
    1.15 +/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    1.16 +/*  this file you indicate that you have read the license and              */
    1.17 +/*  understand and accept it fully.                                        */
    1.18 +/*                                                                         */
    1.19 +/***************************************************************************/
    1.20 +
    1.21 +
    1.22 +#ifndef _FT_GASP_H_
    1.23 +#define _FT_GASP_H_
    1.24 +
    1.25 +#include <ft2build.h>
    1.26 +#include FT_FREETYPE_H
    1.27 +
    1.28 +#ifdef FREETYPE_H
    1.29 +#error "freetype.h of FreeType 1 has been loaded!"
    1.30 +#error "Please fix the directory search order for header files"
    1.31 +#error "so that freetype.h of FreeType 2 is found first."
    1.32 +#endif
    1.33 +
    1.34 +
    1.35 +  /***************************************************************************
    1.36 +   *
    1.37 +   * @section:
    1.38 +   *   gasp_table
    1.39 +   *
    1.40 +   * @title:
    1.41 +   *   Gasp Table
    1.42 +   *
    1.43 +   * @abstract:
    1.44 +   *   Retrieving TrueType `gasp' table entries.
    1.45 +   *
    1.46 +   * @description:
    1.47 +   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
    1.48 +   *   font for specific entries in its `gasp' table, if any.  This is
    1.49 +   *   mainly useful when implementing native TrueType hinting with the
    1.50 +   *   bytecode interpreter to duplicate the Windows text rendering results.
    1.51 +   */
    1.52 +
    1.53 +  /*************************************************************************
    1.54 +   *
    1.55 +   * @enum:
    1.56 +   *   FT_GASP_XXX
    1.57 +   *
    1.58 +   * @description:
    1.59 +   *   A list of values and/or bit-flags returned by the @FT_Get_Gasp
    1.60 +   *   function.
    1.61 +   *
    1.62 +   * @values:
    1.63 +   *   FT_GASP_NO_TABLE ::
    1.64 +   *     This special value means that there is no GASP table in this face.
    1.65 +   *     It is up to the client to decide what to do.
    1.66 +   *
    1.67 +   *   FT_GASP_DO_GRIDFIT ::
    1.68 +   *     Grid-fitting and hinting should be performed at the specified ppem.
    1.69 +   *     This *really* means TrueType bytecode interpretation.
    1.70 +   *
    1.71 +   *   FT_GASP_DO_GRAY ::
    1.72 +   *     Anti-aliased rendering should be performed at the specified ppem.
    1.73 +   *
    1.74 +   *   FT_GASP_SYMMETRIC_SMOOTHING ::
    1.75 +   *     Smoothing along multiple axes must be used with ClearType.
    1.76 +   *
    1.77 +   *   FT_GASP_SYMMETRIC_GRIDFIT ::
    1.78 +   *     Grid-fitting must be used with ClearType's symmetric smoothing.
    1.79 +   *
    1.80 +   * @note:
    1.81 +   *   `ClearType' is Microsoft's implementation of LCD rendering, partly
    1.82 +   *   protected by patents.
    1.83 +   *
    1.84 +   * @since:
    1.85 +   *   2.3.0
    1.86 +   */
    1.87 +#define FT_GASP_NO_TABLE               -1
    1.88 +#define FT_GASP_DO_GRIDFIT           0x01
    1.89 +#define FT_GASP_DO_GRAY              0x02
    1.90 +#define FT_GASP_SYMMETRIC_SMOOTHING  0x08
    1.91 +#define FT_GASP_SYMMETRIC_GRIDFIT    0x10
    1.92 +
    1.93 +
    1.94 +  /*************************************************************************
    1.95 +   *
    1.96 +   * @func:
    1.97 +   *   FT_Get_Gasp
    1.98 +   *
    1.99 +   * @description:
   1.100 +   *   Read the `gasp' table from a TrueType or OpenType font file and
   1.101 +   *   return the entry corresponding to a given character pixel size.
   1.102 +   *
   1.103 +   * @input:
   1.104 +   *   face :: The source face handle.
   1.105 +   *   ppem :: The vertical character pixel size.
   1.106 +   *
   1.107 +   * @return:
   1.108 +   *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
   1.109 +   *   `gasp' table in the face.
   1.110 +   *
   1.111 +   * @since:
   1.112 +   *   2.3.0
   1.113 +   */
   1.114 +  FT_EXPORT( FT_Int )
   1.115 +  FT_Get_Gasp( FT_Face  face,
   1.116 +               FT_UInt  ppem );
   1.117 +
   1.118 +/* */
   1.119 +
   1.120 +#endif /* _FT_GASP_H_ */
   1.121 +
   1.122 +
   1.123 +/* END */