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