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_Module_Constructor">FT_Module_Constructor</a></td><td></td><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
46 <tr><td></td><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td></td><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td></td><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td></tr>
47 <tr><td></td><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td><td></td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
48 <tr><td></td><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td></td><td><a href="#FT_New_Library">FT_New_Library</a></td><td></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
49 <tr><td></td><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td><td></td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
52 <table align=center width="87%"><tr><td>
53 <p>The definitions below are used to manage modules within FreeType. Modules can be added, upgraded, and removed at runtime.</p>
54 </td></tr></table><br>
55 <table align=center width="75%"><tr><td>
56 <h4><a name="FT_Module_Constructor">FT_Module_Constructor</a></h4>
57 <table align=center width="87%"><tr><td>
58 Defined in FT_MODULE_H (freetype/ftmodapi.h).
59 </td></tr></table><br>
60 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
62 <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
63 (*<b>FT_Module_Constructor</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
66 <table align=center width="87%"><tr><td>
67 <p>A function used to initialize (not create) a new module object.</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>module</b></td><td>
73 <p>The module to initialize.</p>
79 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
80 <td width="100%"></td>
81 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
83 <table align=center width="75%"><tr><td>
84 <h4><a name="FT_Module_Destructor">FT_Module_Destructor</a></h4>
85 <table align=center width="87%"><tr><td>
86 Defined in FT_MODULE_H (freetype/ftmodapi.h).
87 </td></tr></table><br>
88 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
90 <span class="keyword">typedef</span> <span class="keyword">void</span>
91 (*<b>FT_Module_Destructor</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
94 <table align=center width="87%"><tr><td>
95 <p>A function used to finalize (not destroy) a given module object.</p>
96 </td></tr></table><br>
97 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
99 <table cellpadding=3 border=0>
100 <tr valign=top><td><b>module</b></td><td>
101 <p>The module to finalize.</p>
107 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
108 <td width="100%"></td>
109 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
111 <table align=center width="75%"><tr><td>
112 <h4><a name="FT_Module_Requester">FT_Module_Requester</a></h4>
113 <table align=center width="87%"><tr><td>
114 Defined in FT_MODULE_H (freetype/ftmodapi.h).
115 </td></tr></table><br>
116 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
118 <span class="keyword">typedef</span> FT_Module_Interface
119 (*<b>FT_Module_Requester</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module,
120 <span class="keyword">const</span> <span class="keyword">char</span>* name );
123 <table align=center width="87%"><tr><td>
124 <p>A function used to query a given module for a specific interface.</p>
125 </td></tr></table><br>
126 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
128 <table cellpadding=3 border=0>
129 <tr valign=top><td><b>module</b></td><td>
130 <p>The module to finalize.</p>
132 <tr valign=top><td><b>name</b></td><td>
133 <p>The name of the interface in the module.</p>
139 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
140 <td width="100%"></td>
141 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
143 <table align=center width="75%"><tr><td>
144 <h4><a name="FT_Module_Class">FT_Module_Class</a></h4>
145 <table align=center width="87%"><tr><td>
146 Defined in FT_MODULE_H (freetype/ftmodapi.h).
147 </td></tr></table><br>
148 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
150 <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Module_Class_
152 <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> module_flags;
153 <a href="ft2-basic_types.html#FT_Long">FT_Long</a> module_size;
154 <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>* module_name;
155 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> module_version;
156 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> module_requires;
158 <span class="keyword">const</span> <span class="keyword">void</span>* module_interface;
160 <a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a> module_init;
161 <a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a> module_done;
162 <a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a> get_interface;
164 } <b>FT_Module_Class</b>;
167 <table align=center width="87%"><tr><td>
168 <p>The module class descriptor.</p>
169 </td></tr></table><br>
170 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
172 <table cellpadding=3 border=0>
173 <tr valign=top><td><b>module_flags</b></td><td>
174 <p>Bit flags describing the module.</p>
176 <tr valign=top><td><b>module_size</b></td><td>
177 <p>The size of one module object/instance in bytes.</p>
179 <tr valign=top><td><b>module_name</b></td><td>
180 <p>The name of the module.</p>
182 <tr valign=top><td><b>module_version</b></td><td>
183 <p>The version, as a 16.16 fixed number (major.minor).</p>
185 <tr valign=top><td><b>module_requires</b></td><td>
186 <p>The version of FreeType this module requires, as a 16.16 fixed number (major.minor). Starts at version 2.0, i.e., 0x20000.</p>
188 <tr valign=top><td><b>module_init</b></td><td>
189 <p>The initializing function.</p>
191 <tr valign=top><td><b>module_done</b></td><td>
192 <p>The finalizing function.</p>
194 <tr valign=top><td><b>get_interface</b></td><td>
195 <p>The interface requesting function.</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>
205 <table align=center width="75%"><tr><td>
206 <h4><a name="FT_Add_Module">FT_Add_Module</a></h4>
207 <table align=center width="87%"><tr><td>
208 Defined in FT_MODULE_H (freetype/ftmodapi.h).
209 </td></tr></table><br>
210 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
212 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
213 <b>FT_Add_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
214 <span class="keyword">const</span> <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a>* clazz );
217 <table align=center width="87%"><tr><td>
218 <p>Add a new module to a given library instance.</p>
219 </td></tr></table><br>
220 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
222 <table cellpadding=3 border=0>
223 <tr valign=top><td><b>library</b></td><td>
224 <p>A handle to the library object.</p>
228 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
230 <table cellpadding=3 border=0>
231 <tr valign=top><td><b>clazz</b></td><td>
232 <p>A pointer to class descriptor for the module.</p>
236 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
237 <p>FreeType error code. 0 means success.</p>
239 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
240 <p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p>
244 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
245 <td width="100%"></td>
246 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
248 <table align=center width="75%"><tr><td>
249 <h4><a name="FT_Get_Module">FT_Get_Module</a></h4>
250 <table align=center width="87%"><tr><td>
251 Defined in FT_MODULE_H (freetype/ftmodapi.h).
252 </td></tr></table><br>
253 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
255 FT_EXPORT( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> )
256 <b>FT_Get_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
257 <span class="keyword">const</span> <span class="keyword">char</span>* module_name );
260 <table align=center width="87%"><tr><td>
261 <p>Find a module by its name.</p>
262 </td></tr></table><br>
263 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
265 <table cellpadding=3 border=0>
266 <tr valign=top><td><b>library</b></td><td>
267 <p>A handle to the library object.</p>
269 <tr valign=top><td><b>module_name</b></td><td>
270 <p>The module's name (as an ASCII string).</p>
274 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
275 <p>A module handle. 0 if none was found.</p>
277 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
278 <p>FreeType's internal modules aren't documented very well, and you should look up the source code for details.</p>
282 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
283 <td width="100%"></td>
284 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
286 <table align=center width="75%"><tr><td>
287 <h4><a name="FT_Remove_Module">FT_Remove_Module</a></h4>
288 <table align=center width="87%"><tr><td>
289 Defined in FT_MODULE_H (freetype/ftmodapi.h).
290 </td></tr></table><br>
291 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
293 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
294 <b>FT_Remove_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
295 <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
298 <table align=center width="87%"><tr><td>
299 <p>Remove a given module from a library instance.</p>
300 </td></tr></table><br>
301 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
303 <table cellpadding=3 border=0>
304 <tr valign=top><td><b>library</b></td><td>
305 <p>A handle to a library object.</p>
309 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
311 <table cellpadding=3 border=0>
312 <tr valign=top><td><b>module</b></td><td>
313 <p>A handle to a module object.</p>
317 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
318 <p>FreeType error code. 0 means success.</p>
320 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
321 <p>The module object is destroyed by the function in case of success.</p>
325 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
326 <td width="100%"></td>
327 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
329 <table align=center width="75%"><tr><td>
330 <h4><a name="FT_Reference_Library">FT_Reference_Library</a></h4>
331 <table align=center width="87%"><tr><td>
332 Defined in FT_MODULE_H (freetype/ftmodapi.h).
333 </td></tr></table><br>
334 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
336 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
337 <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
340 <table align=center width="87%"><tr><td>
341 <p>A counter gets initialized to 1 at the time an <a href="ft2-base_interface.html#FT_Library">FT_Library</a> structure is created. This function increments the counter. <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> then only destroys a library if the counter is 1, otherwise it simply decrements the counter.</p>
342 <p>This function helps in managing life-cycles of structures which reference <a href="ft2-base_interface.html#FT_Library">FT_Library</a> objects.</p>
343 </td></tr></table><br>
344 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
346 <table cellpadding=3 border=0>
347 <tr valign=top><td><b>library</b></td><td>
348 <p>A handle to a target library object.</p>
352 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
353 <p>FreeType error code. 0 means success.</p>
355 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
360 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
361 <td width="100%"></td>
362 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
364 <table align=center width="75%"><tr><td>
365 <h4><a name="FT_New_Library">FT_New_Library</a></h4>
366 <table align=center width="87%"><tr><td>
367 Defined in FT_MODULE_H (freetype/ftmodapi.h).
368 </td></tr></table><br>
369 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
371 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
372 <b>FT_New_Library</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
373 <a href="ft2-base_interface.html#FT_Library">FT_Library</a> *alibrary );
376 <table align=center width="87%"><tr><td>
377 <p>This function is used to create a new FreeType library instance from a given memory object. It is thus possible to use libraries with distinct memory allocators within the same program.</p>
378 <p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
379 <p>Don't use <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a> but <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> to destroy a library instance.</p>
380 </td></tr></table><br>
381 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
383 <table cellpadding=3 border=0>
384 <tr valign=top><td><b>memory</b></td><td>
385 <p>A handle to the original memory object.</p>
389 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
391 <table cellpadding=3 border=0>
392 <tr valign=top><td><b>alibrary</b></td><td>
393 <p>A pointer to handle of a new library object.</p>
397 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
398 <p>FreeType error code. 0 means success.</p>
400 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
401 <p>See the discussion of reference counters in the description of <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>.</p>
405 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
406 <td width="100%"></td>
407 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
409 <table align=center width="75%"><tr><td>
410 <h4><a name="FT_Done_Library">FT_Done_Library</a></h4>
411 <table align=center width="87%"><tr><td>
412 Defined in FT_MODULE_H (freetype/ftmodapi.h).
413 </td></tr></table><br>
414 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
416 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
417 <b>FT_Done_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
420 <table align=center width="87%"><tr><td>
421 <p>Discard a given library object. This closes all drivers and discards all resource objects.</p>
422 </td></tr></table><br>
423 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
425 <table cellpadding=3 border=0>
426 <tr valign=top><td><b>library</b></td><td>
427 <p>A handle to the target library.</p>
431 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
432 <p>FreeType error code. 0 means success.</p>
434 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
435 <p>See the discussion of reference counters in the description of <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>.</p>
439 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
440 <td width="100%"></td>
441 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
443 <table align=center width="75%"><tr><td>
444 <h4><a name="FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></h4>
445 <table align=center width="87%"><tr><td>
446 Defined in FT_MODULE_H (freetype/ftmodapi.h).
447 </td></tr></table><br>
448 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
450 FT_EXPORT( <span class="keyword">void</span> )
451 <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
452 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> hook_index,
453 FT_DebugHook_Func debug_hook );
456 <table align=center width="87%"><tr><td>
457 <p>Set a debug hook function for debugging the interpreter of a font format.</p>
458 </td></tr></table><br>
459 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
461 <table cellpadding=3 border=0>
462 <tr valign=top><td><b>library</b></td><td>
463 <p>A handle to the library object.</p>
467 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
469 <table cellpadding=3 border=0>
470 <tr valign=top><td><b>hook_index</b></td><td>
471 <p>The index of the debug hook. You should use the values defined in ‘ftobjs.h’, e.g., ‘FT_DEBUG_HOOK_TRUETYPE’.</p>
473 <tr valign=top><td><b>debug_hook</b></td><td>
474 <p>The function used to debug the interpreter.</p>
478 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
479 <p>Currently, four debug hook slots are available, but only two (for the TrueType and the Type 1 interpreter) are defined.</p>
480 <p>Since the internal headers of FreeType are no longer installed, the symbol ‘FT_DEBUG_HOOK_TRUETYPE’ isn't available publicly. This is a bug and will be fixed in a forthcoming release.</p>
484 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
485 <td width="100%"></td>
486 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
488 <table align=center width="75%"><tr><td>
489 <h4><a name="FT_Add_Default_Modules">FT_Add_Default_Modules</a></h4>
490 <table align=center width="87%"><tr><td>
491 Defined in FT_MODULE_H (freetype/ftmodapi.h).
492 </td></tr></table><br>
493 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
495 FT_EXPORT( <span class="keyword">void</span> )
496 <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
499 <table align=center width="87%"><tr><td>
500 <p>Add the set of default drivers to a given library object. This is only useful when you create a library object with <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> (usually to plug a custom memory manager).</p>
501 </td></tr></table><br>
502 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
504 <table cellpadding=3 border=0>
505 <tr valign=top><td><b>library</b></td><td>
506 <p>A handle to a new library object.</p>
512 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
513 <td width="100%"></td>
514 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
516 <table align=center width="75%"><tr><td>
517 <h4><a name="FT_Renderer_Class">FT_Renderer_Class</a></h4>
518 <table align=center width="87%"><tr><td>
519 Defined in FT_RENDER_H (freetype/ftrender.h).
520 </td></tr></table><br>
521 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
523 <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Renderer_Class_
525 <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> root;
527 <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> glyph_format;
529 FT_Renderer_RenderFunc render_glyph;
530 FT_Renderer_TransformFunc transform_glyph;
531 FT_Renderer_GetCBoxFunc get_glyph_cbox;
532 FT_Renderer_SetModeFunc set_mode;
534 <a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a>* raster_class;
536 } <b>FT_Renderer_Class</b>;
539 <table align=center width="87%"><tr><td>
540 <p>The renderer module class descriptor.</p>
541 </td></tr></table><br>
542 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
544 <table cellpadding=3 border=0>
545 <tr valign=top><td><b>root</b></td><td>
546 <p>The root <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> fields.</p>
548 <tr valign=top><td><b>glyph_format</b></td><td>
549 <p>The glyph image format this renderer handles.</p>
551 <tr valign=top><td><b>render_glyph</b></td><td>
552 <p>A method used to render the image that is in a given glyph slot into a bitmap.</p>
554 <tr valign=top><td><b>transform_glyph</b></td><td>
555 <p>A method used to transform the image that is in a given glyph slot.</p>
557 <tr valign=top><td><b>get_glyph_cbox</b></td><td>
558 <p>A method used to access the glyph's cbox.</p>
560 <tr valign=top><td><b>set_mode</b></td><td>
561 <p>A method used to pass additional parameters.</p>
563 <tr valign=top><td><b>raster_class</b></td><td>
564 <p>For <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a> renderers only. This is a pointer to its raster's class.</p>
570 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
571 <td width="100%"></td>
572 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
574 <table align=center width="75%"><tr><td>
575 <h4><a name="FT_Get_Renderer">FT_Get_Renderer</a></h4>
576 <table align=center width="87%"><tr><td>
577 Defined in FT_RENDER_H (freetype/ftrender.h).
578 </td></tr></table><br>
579 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
581 FT_EXPORT( <a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a> )
582 <b>FT_Get_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
583 <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> format );
586 <table align=center width="87%"><tr><td>
587 <p>Retrieve the current renderer for a given glyph format.</p>
588 </td></tr></table><br>
589 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
591 <table cellpadding=3 border=0>
592 <tr valign=top><td><b>library</b></td><td>
593 <p>A handle to the library object.</p>
595 <tr valign=top><td><b>format</b></td><td>
596 <p>The glyph format.</p>
600 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
601 <p>A renderer handle. 0 if none found.</p>
603 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
604 <p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p>
605 <p>To add a new renderer, simply use <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>. To retrieve a renderer by its name, use <a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a>.</p>
609 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
610 <td width="100%"></td>
611 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
613 <table align=center width="75%"><tr><td>
614 <h4><a name="FT_Set_Renderer">FT_Set_Renderer</a></h4>
615 <table align=center width="87%"><tr><td>
616 Defined in FT_RENDER_H (freetype/ftrender.h).
617 </td></tr></table><br>
618 <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
620 FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
621 <b>FT_Set_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
622 <a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a> renderer,
623 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_params,
624 <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>* parameters );
627 <table align=center width="87%"><tr><td>
628 <p>Set the current renderer to use, and set additional mode.</p>
629 </td></tr></table><br>
630 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
632 <table cellpadding=3 border=0>
633 <tr valign=top><td><b>library</b></td><td>
634 <p>A handle to the library object.</p>
638 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
640 <table cellpadding=3 border=0>
641 <tr valign=top><td><b>renderer</b></td><td>
642 <p>A handle to the renderer object.</p>
644 <tr valign=top><td><b>num_params</b></td><td>
645 <p>The number of additional parameters.</p>
647 <tr valign=top><td><b>parameters</b></td><td>
648 <p>Additional parameters.</p>
652 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
653 <p>FreeType error code. 0 means success.</p>
655 <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
656 <p>In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.</p>
657 <p>This doesn't change the current renderer for other formats.</p>
658 <p>Currently, only the B/W renderer, if compiled with FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels anti-aliasing mode; this option must be set directly in ‘ftraster.c’ and is undefined by default) accepts a single tag ‘pal5’ to set its gray palette as a character string with 5 elements. Consequently, the third and fourth argument are zero normally.</p>
662 <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
663 <td width="100%"></td>
664 <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>