ftgasp.h

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftgasp.h                                                               */
00004 /*                                                                         */
00005 /*    Access of TrueType's `gasp' table (specification).                   */
00006 /*                                                                         */
00007 /*  Copyright 2007, 2008 by                                                */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef _FT_GASP_H_
00020 #define _FT_GASP_H_
00021 
00022 #include <ft2build.h>
00023 #include FT_FREETYPE_H
00024 
00025 #ifdef FREETYPE_H
00026 #error "freetype.h of FreeType 1 has been loaded!"
00027 #error "Please fix the directory search order for header files"
00028 #error "so that freetype.h of FreeType 2 is found first."
00029 #endif
00030 
00031 
00032   /***************************************************************************
00033    *
00034    * @section:
00035    *   gasp_table
00036    *
00037    * @title:
00038    *   Gasp Table
00039    *
00040    * @abstract:
00041    *   Retrieving TrueType `gasp' table entries.
00042    *
00043    * @description:
00044    *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
00045    *   font for specific entries in its `gasp' table, if any.  This is
00046    *   mainly useful when implementing native TrueType hinting with the
00047    *   bytecode interpreter to duplicate the Windows text rendering results.
00048    */
00049 
00050   /*************************************************************************
00051    *
00052    * @enum:
00053    *   FT_GASP_XXX
00054    *
00055    * @description:
00056    *   A list of values and/or bit-flags returned by the @FT_Get_Gasp
00057    *   function.
00058    *
00059    * @values:
00060    *   FT_GASP_NO_TABLE ::
00061    *     This special value means that there is no GASP table in this face.
00062    *     It is up to the client to decide what to do.
00063    *
00064    *   FT_GASP_DO_GRIDFIT ::
00065    *     Grid-fitting and hinting should be performed at the specified ppem.
00066    *     This *really* means TrueType bytecode interpretation.
00067    *
00068    *   FT_GASP_DO_GRAY ::
00069    *     Anti-aliased rendering should be performed at the specified ppem.
00070    *
00071    *   FT_GASP_SYMMETRIC_SMOOTHING ::
00072    *     Smoothing along multiple axes must be used with ClearType.
00073    *
00074    *   FT_GASP_SYMMETRIC_GRIDFIT ::
00075    *     Grid-fitting must be used with ClearType's symmetric smoothing.
00076    *
00077    * @note:
00078    *   `ClearType' is Microsoft's implementation of LCD rendering, partly
00079    *   protected by patents.
00080    *
00081    * @since:
00082    *   2.3.0
00083    */
00084 #define FT_GASP_NO_TABLE               -1
00085 #define FT_GASP_DO_GRIDFIT           0x01
00086 #define FT_GASP_DO_GRAY              0x02
00087 #define FT_GASP_SYMMETRIC_SMOOTHING  0x08
00088 #define FT_GASP_SYMMETRIC_GRIDFIT    0x10
00089 
00090 
00091   /*************************************************************************
00092    *
00093    * @func:
00094    *   FT_Get_Gasp
00095    *
00096    * @description:
00097    *   Read the `gasp' table from a TrueType or OpenType font file and
00098    *   return the entry corresponding to a given character pixel size.
00099    *
00100    * @input:
00101    *   face :: The source face handle.
00102    *   ppem :: The vertical character pixel size.
00103    *
00104    * @return:
00105    *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
00106    *   `gasp' table in the face.
00107    *
00108    * @since:
00109    *   2.3.0
00110    */
00111   FT_EXPORT( FT_Int )
00112   FT_Get_Gasp( FT_Face  face,
00113                FT_UInt  ppem );
00114 
00115 /* */
00116 
00117 #endif /* _FT_GASP_H_ */
00118 
00119 
00120 /* END */

Generated on Tue Jul 5 14:13:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1