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.5.3 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.5.3 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
Defined in FT_ADVANCES_H (ftadvanc.h).
56
</td></tr></table><br>
57
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
59
#define <b>FT_ADVANCE_FLAG_FAST_ONLY</b> 0x20000000UL
62
<table align=center width="87%"><tr><td>
63
<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>
64
<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>
65
<p>Typically, glyphs that are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.</p>
66
<p>Normal and bytecode hinted modes that require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.</p>
67
</td></tr></table><br>
70
<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
71
<td width="100%"></td>
72
<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
74
<table align=center width="75%"><tr><td>
75
<h4><a name="FT_Get_Advance">FT_Get_Advance</a></h4>
76
<table align=center width="87%"><tr><td>
77
Defined in FT_ADVANCES_H (ftadvanc.h).
78
</td></tr></table><br>
79
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
81
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
82
<b>FT_Get_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
83
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
84
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags,
85
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *padvance );
88
<table align=center width="87%"><tr><td>
89
<p>Retrieve the advance value of a given glyph outline in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>
90
</td></tr></table><br>
91
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
93
<table cellpadding=3 border=0>
94
<tr valign=top><td><b>face</b></td><td>
95
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
97
<tr valign=top><td><b>gindex</b></td><td>
98
<p>The glyph index.</p>
100
<tr valign=top><td><b>load_flags</b></td><td>
101
<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>
105
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
107
<table cellpadding=3 border=0>
108
<tr valign=top><td><b>padvance</b></td><td>
109
<p>The advance value. If scaling is performed (based on the value of ‘load_flags’), the advance value is in 16.16 format. Otherwise, it is in font units.</p>
110
<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>
114
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
115
<p>FreeType error code. 0 means success.</p>
117
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
118
<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>
119
<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>
123
<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
124
<td width="100%"></td>
125
<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
127
<table align=center width="75%"><tr><td>
128
<h4><a name="FT_Get_Advances">FT_Get_Advances</a></h4>
129
<table align=center width="87%"><tr><td>
130
Defined in FT_ADVANCES_H (ftadvanc.h).
131
</td></tr></table><br>
132
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
134
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
135
<b>FT_Get_Advances</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
136
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> start,
137
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> count,
138
<a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> load_flags,
139
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *padvances );
142
<table align=center width="87%"><tr><td>
143
<p>Retrieve the advance values of several glyph outlines in an <a href="ft2-base_interface.html#FT_Face">FT_Face</a>.</p>
144
</td></tr></table><br>
145
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
147
<table cellpadding=3 border=0>
148
<tr valign=top><td><b>face</b></td><td>
149
<p>The source <a href="ft2-base_interface.html#FT_Face">FT_Face</a> handle.</p>
151
<tr valign=top><td><b>start</b></td><td>
152
<p>The first glyph index.</p>
154
<tr valign=top><td><b>count</b></td><td>
155
<p>The number of advance values you want to retrieve.</p>
157
<tr valign=top><td><b>load_flags</b></td><td>
158
<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>
162
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
164
<table cellpadding=3 border=0>
165
<tr valign=top><td><b>padvance</b></td><td>
166
<p>The advance values. This array, to be provided by the caller, must contain at least ‘count’ elements.</p>
167
<p>If scaling is performed (based on the value of ‘load_flags’), the advance values are in 16.16 format. Otherwise, they are in font units.</p>
168
<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>
172
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
173
<p>FreeType error code. 0 means success.</p>
175
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
176
<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>
177
<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>
181
<table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
182
<td width="100%"></td>
183
<td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>