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.4.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.4.9 API Reference</h1></center>
44 <table align=center cellspacing=5 cellpadding=0 border=0>
45 <tr><td></td><td><a href="#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td></td><td><a href="#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td></td><td><a href="#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td></tr>
48 <table align=center width="87%"><tr><td>
49 <p>This section contains the declaration of PFR-specific functions.</p>
50 </td></tr></table><br>
51 <table align=center width="75%"><tr><td>
52 <h4><a name="FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></h4>
53 <table align=center width="87%"><tr><td>
54 Defined in FT_PFR_H (freetype/ftpfr.h).
55 </td></tr></table><br>
56 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
58 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
59 <b>FT_Get_PFR_Metrics</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
60 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *aoutline_resolution,
61 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> *ametrics_resolution,
62 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *ametrics_x_scale,
63 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> *ametrics_y_scale );
66 <table align=center width="87%"><tr><td>
67 <p>Return the outline and metrics resolutions of a given PFR face.</p>
68 </td></tr></table><br>
69 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
71 <table cellpadding=3 border=0>
72 <tr valign=top><td><b>face</b></td><td>
73 <p>Handle to the input face. It can be a non-PFR face.</p>
77 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
79 <table cellpadding=3 border=0>
80 <tr valign=top><td><b>aoutline_resolution</b></td><td>
81 <p>Outline resolution. This is equivalent to ‘face->units_per_EM’ for non-PFR fonts. Optional (parameter can be NULL).</p>
83 <tr valign=top><td><b>ametrics_resolution</b></td><td>
84 <p>Metrics resolution. This is equivalent to ‘outline_resolution’ for non-PFR fonts. Optional (parameter can be NULL).</p>
86 <tr valign=top><td><b>ametrics_x_scale</b></td><td>
87 <p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device sub-pixels. This is equivalent to ‘face->size->x_scale’, but for metrics only. Optional (parameter can be NULL).</p>
89 <tr valign=top><td><b>ametrics_y_scale</b></td><td>
90 <p>Same as ‘ametrics_x_scale’ but for the vertical direction. optional (parameter can be NULL).</p>
94 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
95 <p>FreeType error code. 0 means success.</p>
97 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
98 <p>If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.</p>
102 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
103 <td width="100%"></td>
104 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
106 <table align=center width="75%"><tr><td>
107 <h4><a name="FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></h4>
108 <table align=center width="87%"><tr><td>
109 Defined in FT_PFR_H (freetype/ftpfr.h).
110 </td></tr></table><br>
111 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
113 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
114 <b>FT_Get_PFR_Kerning</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
115 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> left,
116 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> right,
117 <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> *avector );
120 <table align=center width="87%"><tr><td>
121 <p>Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
122 </td></tr></table><br>
123 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
125 <table cellpadding=3 border=0>
126 <tr valign=top><td><b>face</b></td><td>
127 <p>A handle to the input face.</p>
129 <tr valign=top><td><b>left</b></td><td>
130 <p>Index of the left glyph.</p>
132 <tr valign=top><td><b>right</b></td><td>
133 <p>Index of the right glyph.</p>
137 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
139 <table cellpadding=3 border=0>
140 <tr valign=top><td><b>avector</b></td><td>
141 <p>A kerning vector.</p>
145 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
146 <p>FreeType error code. 0 means success.</p>
148 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
149 <p>This function always return distances in original PFR metrics units. This is unlike <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a> with the <a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a> mode, which always returns distances converted to outline units.</p>
150 <p>You can use the value of the ‘x_scale’ and ‘y_scale’ parameters returned by <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to scale these to device sub-pixels.</p>
154 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
155 <td width="100%"></td>
156 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
158 <table align=center width="75%"><tr><td>
159 <h4><a name="FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></h4>
160 <table align=center width="87%"><tr><td>
161 Defined in FT_PFR_H (freetype/ftpfr.h).
162 </td></tr></table><br>
163 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
165 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
166 <b>FT_Get_PFR_Advance</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
167 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> gindex,
168 <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> *aadvance );
171 <table align=center width="87%"><tr><td>
172 <p>Return a given glyph advance, expressed in original metrics units, from a PFR font.</p>
173 </td></tr></table><br>
174 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
176 <table cellpadding=3 border=0>
177 <tr valign=top><td><b>face</b></td><td>
178 <p>A handle to the input face.</p>
180 <tr valign=top><td><b>gindex</b></td><td>
181 <p>The glyph index.</p>
185 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
187 <table cellpadding=3 border=0>
188 <tr valign=top><td><b>aadvance</b></td><td>
189 <p>The glyph advance in metrics units.</p>
193 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
194 <p>FreeType error code. 0 means success.</p>
196 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
197 <p>You can use the ‘x_scale’ or ‘y_scale’ results of <a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a> to convert the advance to device sub-pixels (i.e., 1/64th of pixels).</p>
201 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
202 <td width="100%"></td>
203 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>