annotate freetype2/freetype/ftgasp.h @ 1479:163220e54cc0 draft

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