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_PropertyType">FT_PropertyType</a></td><td></td><td><a href="#BDF_PropertyRec">BDF_PropertyRec</a></td><td></td><td><a href="#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td></tr>
46 <tr><td></td><td><a href="#BDF_Property">BDF_Property</a></td><td></td><td><a href="#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td></td><td></td></tr>
49 <table align=center width="87%"><tr><td>
50 <p>This section contains the declaration of functions specific to BDF and PCF fonts.</p>
51 </td></tr></table><br>
52 <table align=center width="75%"><tr><td>
53 <h4><a name="FT_PropertyType">FT_PropertyType</a></h4>
54 <table align=center width="87%"><tr><td>
55 Defined in FT_BDF_H (freetype/ftbdf.h).
56 </td></tr></table><br>
57 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
59 <span class="keyword">typedef</span> <span class="keyword">enum</span> BDF_PropertyType_
61 <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_NONE</a> = 0,
62 <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_ATOM</a> = 1,
63 <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a> = 2,
64 <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> = 3
69 <table align=center width="87%"><tr><td>
70 <p>A list of BDF property types.</p>
71 </td></tr></table><br>
72 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
74 <table cellpadding=3 border=0>
75 <tr valign=top><td><b>BDF_PROPERTY_TYPE_NONE</b></td><td>
76 <p>Value 0 is used to indicate a missing property.</p>
78 <tr valign=top><td><b>BDF_PROPERTY_TYPE_ATOM</b></td><td>
79 <p>Property is a string atom.</p>
81 <tr valign=top><td colspan=0><b>BDF_PROPERTY_TYPE_INTEGER</b></td></tr>
82 <tr valign=top><td></td><td>
83 <p>Property is a 32-bit signed integer.</p>
85 <tr valign=top><td colspan=0><b>BDF_PROPERTY_TYPE_CARDINAL</b></td></tr>
86 <tr valign=top><td></td><td>
87 <p>Property is a 32-bit unsigned integer.</p>
93 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
94 <td width="100%"></td>
95 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
97 <table align=center width="75%"><tr><td>
98 <h4><a name="BDF_Property">BDF_Property</a></h4>
99 <table align=center width="87%"><tr><td>
100 Defined in FT_BDF_H (freetype/ftbdf.h).
101 </td></tr></table><br>
102 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
104 <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_* <b>BDF_Property</b>;
107 <table align=center width="87%"><tr><td>
108 <p>A handle to a <a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a> structure to model a given BDF/PCF property.</p>
109 </td></tr></table><br>
112 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
113 <td width="100%"></td>
114 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
116 <table align=center width="75%"><tr><td>
117 <h4><a name="BDF_PropertyRec">BDF_PropertyRec</a></h4>
118 <table align=center width="87%"><tr><td>
119 Defined in FT_BDF_H (freetype/ftbdf.h).
120 </td></tr></table><br>
121 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
123 <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_
125 BDF_PropertyType type;
126 <span class="keyword">union</span> {
127 <span class="keyword">const</span> <span class="keyword">char</span>* atom;
128 <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> integer;
129 <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a> cardinal;
133 } <b>BDF_PropertyRec</b>;
136 <table align=center width="87%"><tr><td>
137 <p>This structure models a given BDF/PCF property.</p>
138 </td></tr></table><br>
139 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
141 <table cellpadding=3 border=0>
142 <tr valign=top><td><b>type</b></td><td>
143 <p>The property type.</p>
145 <tr valign=top><td><b>u.atom</b></td><td>
146 <p>The atom string, if type is <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_ATOM</a>.</p>
148 <tr valign=top><td><b>u.integer</b></td><td>
149 <p>A signed integer, if type is <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a>.</p>
151 <tr valign=top><td><b>u.cardinal</b></td><td>
152 <p>An unsigned integer, if type is <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a>.</p>
158 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
159 <td width="100%"></td>
160 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
162 <table align=center width="75%"><tr><td>
163 <h4><a name="FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></h4>
164 <table align=center width="87%"><tr><td>
165 Defined in FT_BDF_H (freetype/ftbdf.h).
166 </td></tr></table><br>
167 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
169 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
170 <b>FT_Get_BDF_Charset_ID</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
171 <span class="keyword">const</span> <span class="keyword">char</span>* *acharset_encoding,
172 <span class="keyword">const</span> <span class="keyword">char</span>* *acharset_registry );
175 <table align=center width="87%"><tr><td>
176 <p>Retrieve a BDF font character set identity, according to the BDF specification.</p>
177 </td></tr></table><br>
178 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
180 <table cellpadding=3 border=0>
181 <tr valign=top><td><b>face</b></td><td>
182 <p>A handle to the input face.</p>
186 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
188 <table cellpadding=3 border=0>
189 <tr valign=top><td><b>acharset_encoding</b></td><td>
190 <p>Charset encoding, as a C string, owned by the face.</p>
192 <tr valign=top><td><b>acharset_registry</b></td><td>
193 <p>Charset registry, as a C string, owned by the face.</p>
197 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
198 <p>FreeType error code. 0 means success.</p>
200 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
201 <p>This function only works with BDF faces, returning an error otherwise.</p>
205 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
206 <td width="100%"></td>
207 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
209 <table align=center width="75%"><tr><td>
210 <h4><a name="FT_Get_BDF_Property">FT_Get_BDF_Property</a></h4>
211 <table align=center width="87%"><tr><td>
212 Defined in FT_BDF_H (freetype/ftbdf.h).
213 </td></tr></table><br>
214 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
216 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
217 <b>FT_Get_BDF_Property</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
218 <span class="keyword">const</span> <span class="keyword">char</span>* prop_name,
219 <a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a> *aproperty );
222 <table align=center width="87%"><tr><td>
223 <p>Retrieve a BDF property from a BDF or PCF font file.</p>
224 </td></tr></table><br>
225 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
227 <table cellpadding=3 border=0>
228 <tr valign=top><td><b>face</b></td><td>
229 <p>A handle to the input face.</p>
231 <tr valign=top><td><b>name</b></td><td>
232 <p>The property name.</p>
236 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
238 <table cellpadding=3 border=0>
239 <tr valign=top><td><b>aproperty</b></td><td>
244 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
245 <p>FreeType error code. 0 means success.</p>
247 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
248 <p>This function works with BDF <i>and</i> PCF fonts. It returns an error otherwise. It also returns an error if the property is not in the font.</p>
249 <p>A ‘property’ is a either key-value pair within the STARTPROPERTIES ... ENDPROPERTIES block of a BDF font or a key-value pair from the ‘info->props’ array within a ‘FontRec’ structure of a PCF font.</p>
250 <p>Integer properties are always stored as ‘signed’ within PCF fonts; consequently, <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> is a possible return value for BDF fonts only.</p>
251 <p>In case of error, ‘aproperty->type’ is always set to <a href="ft2-bdf_fonts.html#FT_PropertyType">BDF_PROPERTY_TYPE_NONE</a>.</p>
255 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
256 <td width="100%"></td>
257 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>