vrshoot

annotate 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
rev   line source
nuclear@0 1 /***************************************************************************/
nuclear@0 2 /* */
nuclear@0 3 /* ftgasp.h */
nuclear@0 4 /* */
nuclear@0 5 /* Access of TrueType's `gasp' table (specification). */
nuclear@0 6 /* */
nuclear@0 7 /* Copyright 2007, 2008 by */
nuclear@0 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
nuclear@0 9 /* */
nuclear@0 10 /* This file is part of the FreeType project, and may only be used, */
nuclear@0 11 /* modified, and distributed under the terms of the FreeType project */
nuclear@0 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
nuclear@0 13 /* this file you indicate that you have read the license and */
nuclear@0 14 /* understand and accept it fully. */
nuclear@0 15 /* */
nuclear@0 16 /***************************************************************************/
nuclear@0 17
nuclear@0 18
nuclear@0 19 #ifndef _FT_GASP_H_
nuclear@0 20 #define _FT_GASP_H_
nuclear@0 21
nuclear@0 22 #include <ft2build.h>
nuclear@0 23 #include FT_FREETYPE_H
nuclear@0 24
nuclear@0 25 #ifdef FREETYPE_H
nuclear@0 26 #error "freetype.h of FreeType 1 has been loaded!"
nuclear@0 27 #error "Please fix the directory search order for header files"
nuclear@0 28 #error "so that freetype.h of FreeType 2 is found first."
nuclear@0 29 #endif
nuclear@0 30
nuclear@0 31
nuclear@0 32 /***************************************************************************
nuclear@0 33 *
nuclear@0 34 * @section:
nuclear@0 35 * gasp_table
nuclear@0 36 *
nuclear@0 37 * @title:
nuclear@0 38 * Gasp Table
nuclear@0 39 *
nuclear@0 40 * @abstract:
nuclear@0 41 * Retrieving TrueType `gasp' table entries.
nuclear@0 42 *
nuclear@0 43 * @description:
nuclear@0 44 * The function @FT_Get_Gasp can be used to query a TrueType or OpenType
nuclear@0 45 * font for specific entries in its `gasp' table, if any. This is
nuclear@0 46 * mainly useful when implementing native TrueType hinting with the
nuclear@0 47 * bytecode interpreter to duplicate the Windows text rendering results.
nuclear@0 48 */
nuclear@0 49
nuclear@0 50 /*************************************************************************
nuclear@0 51 *
nuclear@0 52 * @enum:
nuclear@0 53 * FT_GASP_XXX
nuclear@0 54 *
nuclear@0 55 * @description:
nuclear@0 56 * A list of values and/or bit-flags returned by the @FT_Get_Gasp
nuclear@0 57 * function.
nuclear@0 58 *
nuclear@0 59 * @values:
nuclear@0 60 * FT_GASP_NO_TABLE ::
nuclear@0 61 * This special value means that there is no GASP table in this face.
nuclear@0 62 * It is up to the client to decide what to do.
nuclear@0 63 *
nuclear@0 64 * FT_GASP_DO_GRIDFIT ::
nuclear@0 65 * Grid-fitting and hinting should be performed at the specified ppem.
nuclear@0 66 * This *really* means TrueType bytecode interpretation.
nuclear@0 67 *
nuclear@0 68 * FT_GASP_DO_GRAY ::
nuclear@0 69 * Anti-aliased rendering should be performed at the specified ppem.
nuclear@0 70 *
nuclear@0 71 * FT_GASP_SYMMETRIC_SMOOTHING ::
nuclear@0 72 * Smoothing along multiple axes must be used with ClearType.
nuclear@0 73 *
nuclear@0 74 * FT_GASP_SYMMETRIC_GRIDFIT ::
nuclear@0 75 * Grid-fitting must be used with ClearType's symmetric smoothing.
nuclear@0 76 *
nuclear@0 77 * @note:
nuclear@0 78 * `ClearType' is Microsoft's implementation of LCD rendering, partly
nuclear@0 79 * protected by patents.
nuclear@0 80 *
nuclear@0 81 * @since:
nuclear@0 82 * 2.3.0
nuclear@0 83 */
nuclear@0 84 #define FT_GASP_NO_TABLE -1
nuclear@0 85 #define FT_GASP_DO_GRIDFIT 0x01
nuclear@0 86 #define FT_GASP_DO_GRAY 0x02
nuclear@0 87 #define FT_GASP_SYMMETRIC_SMOOTHING 0x08
nuclear@0 88 #define FT_GASP_SYMMETRIC_GRIDFIT 0x10
nuclear@0 89
nuclear@0 90
nuclear@0 91 /*************************************************************************
nuclear@0 92 *
nuclear@0 93 * @func:
nuclear@0 94 * FT_Get_Gasp
nuclear@0 95 *
nuclear@0 96 * @description:
nuclear@0 97 * Read the `gasp' table from a TrueType or OpenType font file and
nuclear@0 98 * return the entry corresponding to a given character pixel size.
nuclear@0 99 *
nuclear@0 100 * @input:
nuclear@0 101 * face :: The source face handle.
nuclear@0 102 * ppem :: The vertical character pixel size.
nuclear@0 103 *
nuclear@0 104 * @return:
nuclear@0 105 * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
nuclear@0 106 * `gasp' table in the face.
nuclear@0 107 *
nuclear@0 108 * @since:
nuclear@0 109 * 2.3.0
nuclear@0 110 */
nuclear@0 111 FT_EXPORT( FT_Int )
nuclear@0 112 FT_Get_Gasp( FT_Face face,
nuclear@0 113 FT_UInt ppem );
nuclear@0 114
nuclear@0 115 /* */
nuclear@0 116
nuclear@0 117 #endif /* _FT_GASP_H_ */
nuclear@0 118
nuclear@0 119
nuclear@0 120 /* END */