1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
"http://www.w3.org/TR/html4/loose.dtd">
5
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
<title>FreeType-2.3.9 API Reference</title>
7
<style type="text/css">
8
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
10
background: #FFFFFF; }
12
p { text-align: justify; }
13
h1 { text-align: center; }
14
li { text-align: justify; }
15
td { padding: 0 0.5em 0 0.5em; }
16
td.left { padding: 0 0.5em 0 0.5em;
19
a:link { color: #0000EF; }
20
a:visited { color: #51188E; }
21
a:hover { color: #FF0000; }
23
span.keyword { font-family: monospace;
28
pre.colored { color: blue; }
30
ul.empty { list-style-type: none; }
35
<table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
36
<td width="100%"></td>
37
<td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
38
<center><h1>FreeType-2.3.9 API Reference</h1></center>
41
Quick retrieval of advance values
44
<table align=center cellspacing=5 cellpadding=0 border=0>
45
<tr><td></td><td><a href="#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td></td><td><a href="#FT_Get_Advances">FT_Get_Advances</a></td></tr>
46
<tr><td></td><td><a href="#FT_Get_Advance">FT_Get_Advance</a></td><td></td><td></td></tr>
49
<table align=center width="87%"><tr><td>
50
<p>This section contains functions to quickly extract advance values without handling glyph outlines, if possible.</p>
51
</td></tr></table><br>
52
<table align=center width="75%"><tr><td>
53
<h4><a name="FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></h4>
54
<table align=center width="87%"><tr><td>
55
<p>A bit-flag to be OR-ed with the ‘flags’ parameter of the <a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a> and <a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a> functions.</p>
56
<p>If set, it indicates that you want these functions to fail if the corresponding hinting mode or font driver doesn't allow for very quick advance computation.</p>
57
<p>Typically, glyphs which are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.</p>
58
<p>Normal and bytecode hinted modes, which require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.</p>
59
</td></tr></table><br>
62
<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
63
<td width="100%"></td>
64
<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
66
<table align=center width="75%"><tr><td>
67
<h4><a name="FT_Get_Advance">FT_Get_Advance</a></h4>
68
<table align=center width="87%"><tr><td>
69
Defined in FT_ADVANCES_H (freetype/ftadvanc.h).
70
</td></tr></table><br>
71
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
73
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
74
<b>FT_Get_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
75
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
76
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags,
77
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *padvance );
80
<table align=center width="87%"><tr><td>
81
<p>Retrieve the advance value of a given glyph outline in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>. By default, the unhinted advance is returned in font units.</p>
82
</td></tr></table><br>
83
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
85
<table cellpadding=3 border=0>
86
<tr valign=top><td><b>face</b></td><td>
87
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
89
<tr valign=top><td><b>gindex</b></td><td>
90
<p>The glyph index.</p>
92
<tr valign=top><td><b>load_flags</b></td><td>
93
<p>A set of bit flags similar to those used when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>, used to determine what kind of advances you need.</p>
97
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
99
<table cellpadding=3 border=0>
100
<tr valign=top><td><b>padvance</b></td><td>
101
<p>The advance value, in either font units or 16.16 format.</p>
102
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> is set, this is the vertical advance corresponding to a vertical layout. Otherwise, it is the horizontal advance in a horizontal layout.</p>
106
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
107
<p>FreeType error code. 0 means success.</p>
109
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
110
<p>This function may fail if you use <a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p>
111
<p>A scaled advance is returned in 16.16 format but isn't transformed by the affine transformation specified by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
115
<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
116
<td width="100%"></td>
117
<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
119
<table align=center width="75%"><tr><td>
120
<h4><a name="FT_Get_Advances">FT_Get_Advances</a></h4>
121
<table align=center width="87%"><tr><td>
122
Defined in FT_ADVANCES_H (freetype/ftadvanc.h).
123
</td></tr></table><br>
124
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
126
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
127
<b>FT_Get_Advances</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
128
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> start,
129
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> count,
130
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags,
131
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *padvances );
134
<table align=center width="87%"><tr><td>
135
<p>Retrieve the advance values of several glyph outlines in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>. By default, the unhinted advances are returned in font units.</p>
136
</td></tr></table><br>
137
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
139
<table cellpadding=3 border=0>
140
<tr valign=top><td><b>face</b></td><td>
141
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
143
<tr valign=top><td><b>start</b></td><td>
144
<p>The first glyph index.</p>
146
<tr valign=top><td><b>count</b></td><td>
147
<p>The number of advance values you want to retrieve.</p>
149
<tr valign=top><td><b>load_flags</b></td><td>
150
<p>A set of bit flags similar to those used when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
154
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
156
<table cellpadding=3 border=0>
157
<tr valign=top><td><b>padvance</b></td><td>
158
<p>The advances, in either font units or 16.16 format. This array must contain at least ‘count’ elements.</p>
159
<p>If <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a> is set, these are the vertical advances corresponding to a vertical layout. Otherwise, they are the horizontal advances in a horizontal layout.</p>
163
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
164
<p>FreeType error code. 0 means success.</p>
166
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
167
<p>This function may fail if you use <a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p>
168
<p>Scaled advances are returned in 16.16 format but aren't transformed by the affine transformation specified by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
172
<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
173
<td width="100%"></td>
174
<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>