<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
background: #FFFFFF; }
p { text-align: justify; }
h1 { text-align: center; }
li { text-align: justify; }
td { padding: 0 0.5em 0 0.5em; }
td.left { padding: 0 0.5em 0 0.5em;
text-align: left; }
a:link { color: #0000EF; }
a:visited { color: #51188E; }
a:hover { color: #FF0000; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
pre.colored { color: blue; }
ul.empty { list-style-type: none; }
Gasp Table
<
table align=center
cellspacing=5 cellpadding=0 border=0>
<
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 ‘gasp’ table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows
text rendering results.<
/p>
<
h4><
a name="FT_GASP_XXX">FT_GASP_XXX<
/a><
/h4>
Defined in FT_GASP_H (freetype/ftgasp.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
#define <
a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE<
/a> -
1
#define <
a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT<
/a> 0x01
#define <
a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY<
/a> 0x02
#define <
a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING<
/a> 0x08
#define <
a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT<
/a> 0x10
<
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>
<
table cellpadding=3 border=0>
<
tr valign=top><
td><
b>FT_GASP_NO_TABLE<
/b><
/td><
td>
<
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>
<
tr valign=top><
td><
b>FT_GASP_DO_GRIDFIT<
/b><
/td><
td>
<
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>
<
tr valign=top><
td><
b>FT_GASP_DO_GRAY<
/b><
/td><
td>
<
p>Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.<
/p>
<
tr valign=top><
td colspan=0><
b>FT_GASP_SYMMETRIC_SMOOTHING<
/b><
/td><
/tr>
<
p>If set, smoothing along
multiple axes must be used with ClearType.<
/p>
<
tr valign=top><
td colspan=0><
b>FT_GASP_SYMMETRIC_GRIDFIT<
/b><
/td><
/tr>
<
p>Grid-fitting must be used with ClearType
's symmetric smoothing.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
<p>The bit-flags ‘FT_GASP_DO_GRIDFIT’ and ‘FT_GASP_DO_GRAY’ are to be used for standard font rasterization only. Independently of that, ‘FT_GASP_SYMMETRIC_SMOOTHING’ and ‘FT_GASP_SYMMETRIC_GRIDFIT’ are to be used if ClearType is enabled (and ‘FT_GASP_DO_GRIDFIT’ and ‘FT_GASP_DO_GRAY’ are consequently ignored).</p>
<p>‘ClearType’ is Microsoft's implementation of LCD rendering, partly protected by patents.<
/p>
<
h4><
a name="FT_Get_Gasp">FT_Get_Gasp<
/a><
/h4>
Defined in FT_GASP_H (freetype/ftgasp.h).
<
table align=center
width="87%"><
tr bgcolor="#D6E8FF"><
td><
pre>
FT_EXPORT
( <
a href="ft2-basic_types.html#FT_Int">FT_Int<
/a>
)
<
b>FT_Get_Gasp<
/b>
( <
a href="ft2-base_interface.html#FT_Face">FT_Face<
/a>
face,
<
a href="ft2-basic_types.html#FT_UInt">FT_UInt<
/a> ppem
);
<
p>Read the ‘gasp’ table from a TrueType or OpenType font file and return the entry corresponding to a given character pixel
size.<
/p>
<
table cellpadding=3 border=0>
<
p>The source
face handle.<
/p>
<
p>The vertical character pixel
size.<
/p>
<
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 ‘gasp’ table in the
face.<
/p>