1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "https://www.w3.org/TR/html4/loose.dtd">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>FreeType-2.9 API Reference</title>
7 <style type="text/css">
8 a:link { color: #0000EF; }
9 a:visited { color: #51188E; }
10 a:hover { color: #FF0000; }
12 body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
18 div.section { width: 75%;
20 div.section hr { margin: 4ex 0 1ex 0; }
21 div.section h4 { background-color: #EEEEFF;
25 margin: 3ex 0 1.5ex 9%;
26 padding: 0.3ex 0 0.3ex 1%; }
27 div.section p { margin: 1.5ex 0 1.5ex 10%; }
28 div.section pre { margin: 3ex 0 3ex 9%;
29 background-color: #D6E8FF;
30 padding: 2ex 0 2ex 1%; }
31 div.section table.fields { width: 90%;
32 margin: 1.5ex 0 1.5ex 10%; }
33 div.section table.toc { width: 95%;
34 margin: 1.5ex 0 1.5ex 5%; }
35 div.timestamp { text-align: center;
37 margin: 1.5ex 0 1.5ex 0; }
39 h1 { text-align: center; }
40 h3 { font-size: medium;
41 margin: 4ex 0 1.5ex 0; }
43 p { text-align: justify; }
45 pre.colored { color: blue; }
47 span.keyword { font-family: monospace;
52 table.fields td.val { font-weight: bold;
55 vertical-align: baseline;
56 padding: 1ex 1em 1ex 0; }
57 table.fields td.desc { vertical-align: baseline;
58 padding: 1ex 0 1ex 1em; }
59 table.fields td.desc p:first-child { margin: 0; }
60 table.fields td.desc p { margin: 1.5ex 0 0 0; }
61 table.index { margin: 6ex auto 6ex auto;
63 border-collapse: separate;
64 border-spacing: 1em 0.3ex; }
65 table.index tr { padding: 0; }
66 table.index td { padding: 0; }
67 table.index-toc-link { width: 100%;
70 margin: 1ex 0 1ex 0; }
71 table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
74 table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
77 table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
80 table.synopsis { margin: 6ex auto 6ex auto;
82 border-collapse: separate;
83 border-spacing: 2em 0.6ex; }
84 table.synopsis tr { padding: 0; }
85 table.synopsis td { padding: 0; }
86 table.toc td.link { width: 30%;
88 vertical-align: baseline;
89 padding: 1ex 1em 1ex 0; }
90 table.toc td.desc { vertical-align: baseline;
91 padding: 1ex 0 1ex 1em;
93 table.toc td.desc p:first-child { margin: 0;
95 table.toc td.desc p { margin: 1.5ex 0 0 0;
102 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
103 <h1>FreeType-2.9 API Reference</h1>
105 <h1 id="bdf_fonts">BDF and PCF Files</h1>
107 <table class="synopsis">
108 <tr><td><a href="#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td></tr>
109 <tr><td><a href="#BDF_Property">BDF_Property</a></td><td><a href="#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td></td></tr>
113 <p>This section contains the declaration of functions specific to BDF and PCF fonts.</p>
115 <div class="section">
116 <h3 id="BDF_PropertyType">BDF_PropertyType</h3>
117 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
119 <span class="keyword">typedef</span> <span class="keyword">enum</span> BDF_PropertyType_
121 <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_NONE">BDF_PROPERTY_TYPE_NONE</a> = 0,
122 <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_ATOM">BDF_PROPERTY_TYPE_ATOM</a> = 1,
123 <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_INTEGER">BDF_PROPERTY_TYPE_INTEGER</a> = 2,
124 <a href="ft2-bdf_fonts.html#BDF_PROPERTY_TYPE_CARDINAL">BDF_PROPERTY_TYPE_CARDINAL</a> = 3
126 } <b>BDF_PropertyType</b>;
129 <p>A list of BDF property types.</p>
132 <table class="fields">
133 <tr><td class="val" id="BDF_PROPERTY_TYPE_NONE">BDF_PROPERTY_TYPE_NONE</td><td class="desc">
134 <p>Value 0 is used to indicate a missing property.</p>
136 <tr><td class="val" id="BDF_PROPERTY_TYPE_ATOM">BDF_PROPERTY_TYPE_ATOM</td><td class="desc">
137 <p>Property is a string atom.</p>
139 <tr><td class="val" id="BDF_PROPERTY_TYPE_INTEGER">BDF_PROPERTY_TYPE_INTEGER</td><td class="desc">
140 <p>Property is a 32-bit signed integer.</p>
142 <tr><td class="val" id="BDF_PROPERTY_TYPE_CARDINAL">BDF_PROPERTY_TYPE_CARDINAL</td><td class="desc">
143 <p>Property is a 32-bit unsigned integer.</p>
148 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
150 <div class="section">
151 <h3 id="BDF_Property">BDF_Property</h3>
152 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
154 <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_* <b>BDF_Property</b>;
157 <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>
160 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
162 <div class="section">
163 <h3 id="BDF_PropertyRec">BDF_PropertyRec</h3>
164 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
166 <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_
168 <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a> type;
169 <span class="keyword">union</span> {
170 <span class="keyword">const</span> <span class="keyword">char</span>* atom;
171 <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a> integer;
172 <a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a> cardinal;
176 } <b>BDF_PropertyRec</b>;
179 <p>This structure models a given BDF/PCF property.</p>
182 <table class="fields">
183 <tr><td class="val" id="type">type</td><td class="desc">
184 <p>The property type.</p>
186 <tr><td class="val" id="u.atom">u.atom</td><td class="desc">
187 <p>The atom string, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a>. May be NULL, indicating an empty string.</p>
189 <tr><td class="val" id="u.integer">u.integer</td><td class="desc">
190 <p>A signed integer, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a>.</p>
192 <tr><td class="val" id="u.cardinal">u.cardinal</td><td class="desc">
193 <p>An unsigned integer, if type is <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a>.</p>
198 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
200 <div class="section">
201 <h3 id="FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</h3>
202 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
204 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
205 <b>FT_Get_BDF_Charset_ID</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
206 <span class="keyword">const</span> <span class="keyword">char</span>* *acharset_encoding,
207 <span class="keyword">const</span> <span class="keyword">char</span>* *acharset_registry );
210 <p>Retrieve a BDF font character set identity, according to the BDF specification.</p>
213 <table class="fields">
214 <tr><td class="val" id="face">face</td><td class="desc">
215 <p>A handle to the input face.</p>
220 <table class="fields">
221 <tr><td class="val" id="acharset_encoding">acharset_encoding</td><td class="desc">
222 <p>Charset encoding, as a C string, owned by the face.</p>
224 <tr><td class="val" id="acharset_registry">acharset_registry</td><td class="desc">
225 <p>Charset registry, as a C string, owned by the face.</p>
230 <p>FreeType error code. 0 means success.</p>
233 <p>This function only works with BDF faces, returning an error otherwise.</p>
236 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
238 <div class="section">
239 <h3 id="FT_Get_BDF_Property">FT_Get_BDF_Property</h3>
240 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
242 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
243 <b>FT_Get_BDF_Property</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a> face,
244 <span class="keyword">const</span> <span class="keyword">char</span>* prop_name,
245 <a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a> *aproperty );
248 <p>Retrieve a BDF property from a BDF or PCF font file.</p>
251 <table class="fields">
252 <tr><td class="val" id="face">face</td><td class="desc">
253 <p>A handle to the input face.</p>
255 <tr><td class="val" id="name">name</td><td class="desc">
256 <p>The property name.</p>
261 <table class="fields">
262 <tr><td class="val" id="aproperty">aproperty</td><td class="desc">
268 <p>FreeType error code. 0 means success.</p>
271 <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>
272 <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>
273 <p>Integer properties are always stored as ‘signed’ within PCF fonts; consequently, <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a> is a possible return value for BDF fonts only.</p>
274 <p>In case of error, ‘aproperty->type’ is always set to <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a>.</p>
277 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>