Imported Upstream version 2.8
[platform/upstream/freetype2.git] / docs / reference / ft2-gasp_table.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>FreeType-2.8 API Reference</title>
7 <style type="text/css">
8   a:link { color: #0000EF; }
9   a:visited { color: #51188E; }
10   a:hover { color: #FF0000; }
11
12   body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
13          color: #000000;
14          background: #FFFFFF;
15          width: 87%;
16          margin: auto; }
17
18   div.section { width: 75%;
19                 margin: auto; }
20   div.section hr { margin: 4ex 0 1ex 0; }
21   div.section h4 { background-color: #EEEEFF;
22                    font-size: medium;
23                    font-style: oblique;
24                    font-weight: bold;
25                    margin: 3ex 0 1.5ex 9%;
26                    padding: 0.3ex 0 0.3ex 1%; }
27   div.section p { margin: 1.5ex 0 1.5ex 10%; }
28   div.section pre { margin: 3ex 0 3ex 9%;
29                     background-color: #D6E8FF;
30                     padding: 2ex 0 2ex 1%; }
31   div.section table.fields { width: 90%;
32                              margin: 1.5ex 0 1.5ex 10%; }
33   div.section table.toc { width: 95%;
34                           margin: 1.5ex 0 1.5ex 5%; }
35   div.timestamp { text-align: center;
36                   font-size: 69%;
37                   margin: 1.5ex 0 1.5ex 0; }
38
39   h1 { text-align: center; }
40   h3 { font-size: medium;
41        margin: 4ex 0 1.5ex 0; }
42
43   p { text-align: justify; }
44
45   pre.colored { color: blue; }
46
47   span.keyword { font-family: monospace;
48                  text-align: left;
49                  white-space: pre;
50                  color: darkblue; }
51
52   table.fields td.val { font-weight: bold;
53                         text-align: right;
54                         width: 30%;
55                         vertical-align: baseline;
56                         padding: 1ex 1em 1ex 0; }
57   table.fields td.desc { vertical-align: baseline;
58                          padding: 1ex 0 1ex 1em; }
59   table.fields td.desc p:first-child { margin: 0; }
60   table.fields td.desc p { margin: 1.5ex 0 0 0; }
61   table.index { margin: 6ex auto 6ex auto;
62                 border: 0;
63                 border-collapse: separate;
64                 border-spacing: 1em 0.3ex; }
65   table.index tr { padding: 0; }
66   table.index td { padding: 0; }
67   table.index-toc-link { width: 100%;
68                          border: 0;
69                          border-spacing: 0;
70                          margin: 1ex 0 1ex 0; }
71   table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
72                                  font-size: 83%;
73                                  text-align: left; }
74   table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
75                                    font-size: 83%;
76                                    text-align: center; }
77   table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
78                                   font-size: 83%;
79                                   text-align: right; }
80   table.synopsis { margin: 6ex auto 6ex auto;
81                    border: 0;
82                    border-collapse: separate;
83                    border-spacing: 2em 0.6ex; }
84   table.synopsis tr { padding: 0; }
85   table.synopsis td { padding: 0; }
86   table.toc td.link { width: 30%;
87                       text-align: right;
88                       vertical-align: baseline;
89                       padding: 1ex 1em 1ex 0; }
90   table.toc td.desc { vertical-align: baseline;
91                       padding: 1ex 0 1ex 1em;
92                       text-align: left; }
93   table.toc td.desc p:first-child { margin: 0;
94                                     text-align: left; }
95   table.toc td.desc p { margin: 1.5ex 0 0 0;
96                         text-align: left; }
97
98 </style>
99 </head>
100 <body>
101
102 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
103 <h1>FreeType-2.8 API Reference</h1>
104
105 <h1 id="gasp_table">Gasp Table</h1>
106 <h2>Synopsis</h2>
107 <table class="synopsis">
108 <tr><td><a href="#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="#FT_Get_Gasp">FT_Get_Gasp</a></td><td></td><td></td><td></td><td></td></tr>
109 </table>
110
111
112 <p>The function <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> can be used to query a TrueType or OpenType font for specific entries in its &lsquo;gasp&rsquo; table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results.</p>
113
114 <div class="section">
115 <h3 id="FT_GASP_XXX">FT_GASP_XXX</h3>
116 <p>Defined in FT_GASP_H (freetype/ftgasp.h).</p>
117 <pre>
118 #define <a href="ft2-gasp_table.html#FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</a>               -1
119 #define <a href="ft2-gasp_table.html#FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</a>           0x01
120 #define <a href="ft2-gasp_table.html#FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</a>              0x02
121 #define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a>    0x04
122 #define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</a>  0x08
123 </pre>
124
125 <p>A list of values and/or bit-flags returned by the <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> function.</p>
126
127 <h4>values</h4>
128 <table class="fields">
129 <tr><td class="val" id="FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</td><td class="desc">
130 <p>This special value means that there is no GASP table in this face. It is up to the client to decide what to do.</p>
131 </td></tr>
132 <tr><td class="val" id="FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</td><td class="desc">
133 <p>Grid-fitting and hinting should be performed at the specified ppem. This <b>really</b> means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.</p>
134 </td></tr>
135 <tr><td class="val" id="FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</td><td class="desc">
136 <p>Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.</p>
137 </td></tr>
138 <tr><td class="val" id="FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</td><td class="desc">
139 <p>If set, smoothing along multiple axes must be used with ClearType.</p>
140 </td></tr>
141 <tr><td class="val" id="FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</td><td class="desc">
142 <p>Grid-fitting must be used with ClearType's symmetric smoothing.</p>
143 </td></tr>
144 </table>
145
146 <h4>note</h4>
147 <p>The bit-flags &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are to be used for standard font rasterization only. Independently of that, &lsquo;FT_GASP_SYMMETRIC_SMOOTHING&rsquo; and &lsquo;FT_GASP_SYMMETRIC_GRIDFIT&rsquo; are to be used if ClearType is enabled (and &lsquo;FT_GASP_DO_GRIDFIT&rsquo; and &lsquo;FT_GASP_DO_GRAY&rsquo; are consequently ignored).</p>
148 <p>&lsquo;ClearType&rsquo; is Microsoft's implementation of LCD rendering, partly protected by patents.</p>
149
150 <h4>since</h4>
151 <p>2.3.0</p>
152
153 <hr>
154 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
155
156 <div class="section">
157 <h3 id="FT_Get_Gasp">FT_Get_Gasp</h3>
158 <p>Defined in FT_GASP_H (freetype/ftgasp.h).</p>
159 <pre>
160   FT_EXPORT( <a href="ft2-basic_types.html#FT_Int">FT_Int</a> )
161   <b>FT_Get_Gasp</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face,
162                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  ppem );
163 </pre>
164
165 <p>For a TrueType or OpenType font file, return the rasterizer behaviour flags from the font's &lsquo;gasp&rsquo; table corresponding to a given character pixel size.</p>
166
167 <h4>input</h4>
168 <table class="fields">
169 <tr><td class="val" id="face">face</td><td class="desc">
170 <p>The source face handle.</p>
171 </td></tr>
172 <tr><td class="val" id="ppem">ppem</td><td class="desc">
173 <p>The vertical character pixel size.</p>
174 </td></tr>
175 </table>
176
177 <h4>return</h4>
178 <p>Bit flags (see <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a>), or <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> if there is no &lsquo;gasp&rsquo; table in the face.</p>
179
180 <h4>note</h4>
181 <p>If you want to use the MM functionality of OpenType variation fonts (i.e., using <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> and friends), call this function <b>after</b> setting an instance since the return values can change.</p>
182
183 <h4>since</h4>
184 <p>2.3.0</p>
185
186 <hr>
187 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
188
189 </body>
190 </html>