eef42aa11ef8b4f99e672aa5502ec0429fb26f9b
[platform/upstream/freetype2.git] / docs / reference / ft2-bdf_fonts.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "https://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
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; }
11
12   body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
13          color: #000000;
14          background: #FFFFFF;
15          width: 87%;
16          margin: auto; }
17
18   div.section { width: 75%;
19                 margin: auto; }
20   div.section hr { margin: 4ex 0 1ex 0; }
21   div.section h4 { background-color: #EEEEFF;
22                    font-size: medium;
23                    font-style: oblique;
24                    font-weight: bold;
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;
36                   font-size: 69%;
37                   margin: 1.5ex 0 1.5ex 0; }
38
39   h1 { text-align: center; }
40   h3 { font-size: medium;
41        margin: 4ex 0 1.5ex 0; }
42
43   p { text-align: justify; }
44
45   pre.colored { color: blue; }
46
47   span.keyword { font-family: monospace;
48                  text-align: left;
49                  white-space: pre;
50                  color: darkblue; }
51
52   table.fields td.val { font-weight: bold;
53                         text-align: right;
54                         width: 30%;
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;
62                 border: 0;
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%;
68                          border: 0;
69                          border-spacing: 0;
70                          margin: 1ex 0 1ex 0; }
71   table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
72                                  font-size: 83%;
73                                  text-align: left; }
74   table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
75                                    font-size: 83%;
76                                    text-align: center; }
77   table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
78                                   font-size: 83%;
79                                   text-align: right; }
80   table.synopsis { margin: 6ex auto 6ex auto;
81                    border: 0;
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%;
87                       text-align: right;
88                       vertical-align: baseline;
89                       padding: 1ex 1em 1ex 0; }
90   table.toc td.desc { vertical-align: baseline;
91                       padding: 1ex 0 1ex 1em;
92                       text-align: left; }
93   table.toc td.desc p:first-child { margin: 0;
94                                     text-align: left; }
95   table.toc td.desc p { margin: 1.5ex 0 0 0;
96                         text-align: left; }
97
98 </style>
99 </head>
100 <body>
101
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>
104
105 <h1 id="bdf_fonts">BDF and PCF Files</h1>
106 <h2>Synopsis</h2>
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>
110 </table>
111
112
113 <p>This section contains the declaration of functions specific to BDF and PCF fonts.</p>
114
115 <div class="section">
116 <h3 id="BDF_PropertyType">BDF_PropertyType</h3>
117 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
118 <pre>
119   <span class="keyword">typedef</span> <span class="keyword">enum</span>  BDF_PropertyType_
120   {
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
125
126   } <b>BDF_PropertyType</b>;
127 </pre>
128
129 <p>A list of BDF property types.</p>
130
131 <h4>values</h4>
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&nbsp;0 is used to indicate a missing property.</p>
135 </td></tr>
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>
138 </td></tr>
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>
141 </td></tr>
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>
144 </td></tr>
145 </table>
146
147 <hr>
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>
149
150 <div class="section">
151 <h3 id="BDF_Property">BDF_Property</h3>
152 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
153 <pre>
154   <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_*  <b>BDF_Property</b>;
155 </pre>
156
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>
158
159 <hr>
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>
161
162 <div class="section">
163 <h3 id="BDF_PropertyRec">BDF_PropertyRec</h3>
164 <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p>
165 <pre>
166   <span class="keyword">typedef</span> <span class="keyword">struct</span>  BDF_PropertyRec_
167   {
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;
173
174     } u;
175
176   } <b>BDF_PropertyRec</b>;
177 </pre>
178
179 <p>This structure models a given BDF/PCF property.</p>
180
181 <h4>fields</h4>
182 <table class="fields">
183 <tr><td class="val" id="type">type</td><td class="desc">
184 <p>The property type.</p>
185 </td></tr>
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>
188 </td></tr>
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>
191 </td></tr>
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>
194 </td></tr>
195 </table>
196
197 <hr>
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>
199
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>
203 <pre>
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 );
208 </pre>
209
210 <p>Retrieve a BDF font character set identity, according to the BDF specification.</p>
211
212 <h4>input</h4>
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>
216 </td></tr>
217 </table>
218
219 <h4>output</h4>
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&nbsp;string, owned by the face.</p>
223 </td></tr>
224 <tr><td class="val" id="acharset_registry">acharset_registry</td><td class="desc">
225 <p>Charset registry, as a C&nbsp;string, owned by the face.</p>
226 </td></tr>
227 </table>
228
229 <h4>return</h4>
230 <p>FreeType error code. 0&nbsp;means success.</p>
231
232 <h4>note</h4>
233 <p>This function only works with BDF faces, returning an error otherwise.</p>
234
235 <hr>
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>
237
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>
241 <pre>
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 );
246 </pre>
247
248 <p>Retrieve a BDF property from a BDF or PCF font file.</p>
249
250 <h4>input</h4>
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>
254 </td></tr>
255 <tr><td class="val" id="name">name</td><td class="desc">
256 <p>The property name.</p>
257 </td></tr>
258 </table>
259
260 <h4>output</h4>
261 <table class="fields">
262 <tr><td class="val" id="aproperty">aproperty</td><td class="desc">
263 <p>The property.</p>
264 </td></tr>
265 </table>
266
267 <h4>return</h4>
268 <p>FreeType error code. 0&nbsp;means success.</p>
269
270 <h4>note</h4>
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 &lsquo;property&rsquo; is a either key-value pair within the STARTPROPERTIES ... ENDPROPERTIES block of a BDF font or a key-value pair from the &lsquo;info-&gt;props&rsquo; array within a &lsquo;FontRec&rsquo; structure of a PCF font.</p>
273 <p>Integer properties are always stored as &lsquo;signed&rsquo; 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, &lsquo;aproperty-&gt;type&rsquo; is always set to <a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a>.</p>
275
276 <hr>
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>
278
279 </body>
280 </html>