1 /***************************************************************************/
5 /* Access of TrueType's `gasp' table (specification). */
7 /* Copyright 2007 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
16 /***************************************************************************/
23 #include FT_FREETYPE_H
25 /***************************************************************************
34 * Retrieving TrueType `gasp' table entries
37 * The function @FT_Get_Gasp can be used to query a TrueType or OpenType
38 * font for specific entries in their `gasp' table, if any. This is
39 * mainly useful when implementing native TrueType hinting with the
40 * bytecode interpreter to duplicate the Windows text rendering results.
43 /*************************************************************************
49 * A list of values and/or bit-flags returned by the @FT_Get_Gasp
54 * This special value means that there is no GASP table in this face.
55 * It is up to the client to decide what to do.
57 * FT_GASP_DO_GRIDFIT ::
58 * Grid-fitting and hinting should be performed at the specified ppem.
59 * This *really* means TrueType bytecode interpretation.
62 * Anti-aliased rendering should be performed at the specified ppem.
64 * FT_GASP_SYMMETRIC_SMOOTHING ::
65 * Smoothing along multiple axes must be used with ClearType.
67 * FT_GASP_SYMMETRIC_GRIDFIT ::
68 * Grid-fitting must be used with ClearType's symmetric smoothing.
71 * `ClearType' is Microsoft's implementation of LCD rendering, partly
72 * protected by patents.
77 #define FT_GASP_NO_TABLE -1
78 #define FT_GASP_DO_GRIDFIT 0x01
79 #define FT_GASP_DO_GRAY 0x02
80 #define FT_GASP_SYMMETRIC_SMOOTHING 0x08
81 #define FT_GASP_SYMMETRIC_GRIDFIT 0x10
84 /*************************************************************************
90 * Read the `gasp' table from a TrueType or OpenType font file and
91 * return the entry corresponding to a given character pixel size.
94 * face :: The source face handle.
95 * ppem :: The vertical character pixel size.
98 * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE is there is no
99 * `gasp' table in the face.
105 FT_Get_Gasp( FT_Face face
,
110 #endif /* _FT_GASP_H_ */