/modules/freetype2/docs/reference/ft2-module_management.html

http://github.com/zpao/v8monkey · HTML · 666 lines · 606 code · 60 blank · 0 comment · 0 complexity · 140f816263a4e4fba0df912082e517c6 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://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.4.3 API Reference</title>
  7. <style type="text/css">
  8. body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
  9. color: #000000;
  10. background: #FFFFFF; }
  11. p { text-align: justify; }
  12. h1 { text-align: center; }
  13. li { text-align: justify; }
  14. td { padding: 0 0.5em 0 0.5em; }
  15. td.left { padding: 0 0.5em 0 0.5em;
  16. text-align: left; }
  17. a:link { color: #0000EF; }
  18. a:visited { color: #51188E; }
  19. a:hover { color: #FF0000; }
  20. span.keyword { font-family: monospace;
  21. text-align: left;
  22. white-space: pre;
  23. color: darkblue; }
  24. pre.colored { color: blue; }
  25. ul.empty { list-style-type: none; }
  26. </style>
  27. </head>
  28. <body>
  29. <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
  30. <td width="100%"></td>
  31. <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  32. <center><h1>FreeType-2.4.3 API Reference</h1></center>
  33. <center><h1>
  34. Module Management
  35. </h1></center>
  36. <h2>Synopsis</h2>
  37. <table align=center cellspacing=5 cellpadding=0 border=0>
  38. <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>
  39. <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>
  40. <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>
  41. <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>
  42. <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>
  43. </table><br><br>
  44. <table align=center width="87%"><tr><td>
  45. <p>The definitions below are used to manage modules within FreeType. Modules can be added, upgraded, and removed at runtime.</p>
  46. </td></tr></table><br>
  47. <table align=center width="75%"><tr><td>
  48. <h4><a name="FT_Module_Constructor">FT_Module_Constructor</a></h4>
  49. <table align=center width="87%"><tr><td>
  50. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  51. </td></tr></table><br>
  52. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  53. <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Error">FT_Error</a>
  54. (*<b>FT_Module_Constructor</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
  55. </pre></table><br>
  56. <table align=center width="87%"><tr><td>
  57. <p>A function used to initialize (not create) a new module object.</p>
  58. </td></tr></table><br>
  59. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  60. <p></p>
  61. <table cellpadding=3 border=0>
  62. <tr valign=top><td><b>module</b></td><td>
  63. <p>The module to initialize.</p>
  64. </td></tr>
  65. </table>
  66. </td></tr></table>
  67. </td></tr></table>
  68. <hr width="75%">
  69. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  70. <td width="100%"></td>
  71. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  72. <table align=center width="75%"><tr><td>
  73. <h4><a name="FT_Module_Destructor">FT_Module_Destructor</a></h4>
  74. <table align=center width="87%"><tr><td>
  75. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  76. </td></tr></table><br>
  77. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  78. <span class="keyword">typedef</span> <span class="keyword">void</span>
  79. (*<b>FT_Module_Destructor</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
  80. </pre></table><br>
  81. <table align=center width="87%"><tr><td>
  82. <p>A function used to finalize (not destroy) a given module object.</p>
  83. </td></tr></table><br>
  84. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  85. <p></p>
  86. <table cellpadding=3 border=0>
  87. <tr valign=top><td><b>module</b></td><td>
  88. <p>The module to finalize.</p>
  89. </td></tr>
  90. </table>
  91. </td></tr></table>
  92. </td></tr></table>
  93. <hr width="75%">
  94. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  95. <td width="100%"></td>
  96. <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="FT_Module_Requester">FT_Module_Requester</a></h4>
  99. <table align=center width="87%"><tr><td>
  100. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  101. </td></tr></table><br>
  102. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  103. <span class="keyword">typedef</span> FT_Module_Interface
  104. (*<b>FT_Module_Requester</b>)( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module,
  105. <span class="keyword">const</span> <span class="keyword">char</span>* name );
  106. </pre></table><br>
  107. <table align=center width="87%"><tr><td>
  108. <p>A function used to query a given module for a specific interface.</p>
  109. </td></tr></table><br>
  110. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  111. <p></p>
  112. <table cellpadding=3 border=0>
  113. <tr valign=top><td><b>module</b></td><td>
  114. <p>The module to finalize.</p>
  115. </td></tr>
  116. <tr valign=top><td><b>name</b></td><td>
  117. <p>The name of the interface in the module.</p>
  118. </td></tr>
  119. </table>
  120. </td></tr></table>
  121. </td></tr></table>
  122. <hr width="75%">
  123. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  124. <td width="100%"></td>
  125. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  126. <table align=center width="75%"><tr><td>
  127. <h4><a name="FT_Module_Class">FT_Module_Class</a></h4>
  128. <table align=center width="87%"><tr><td>
  129. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  130. </td></tr></table><br>
  131. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  132. <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Module_Class_
  133. {
  134. <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a> module_flags;
  135. <a href="ft2-basic_types.html#FT_Long">FT_Long</a> module_size;
  136. <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_String">FT_String</a>* module_name;
  137. <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> module_version;
  138. <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> module_requires;
  139. <span class="keyword">const</span> <span class="keyword">void</span>* module_interface;
  140. <a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a> module_init;
  141. <a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a> module_done;
  142. <a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a> get_interface;
  143. } <b>FT_Module_Class</b>;
  144. </pre></table><br>
  145. <table align=center width="87%"><tr><td>
  146. <p>The module class descriptor.</p>
  147. </td></tr></table><br>
  148. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
  149. <p></p>
  150. <table cellpadding=3 border=0>
  151. <tr valign=top><td><b>module_flags</b></td><td>
  152. <p>Bit flags describing the module.</p>
  153. </td></tr>
  154. <tr valign=top><td><b>module_size</b></td><td>
  155. <p>The size of one module object/instance in bytes.</p>
  156. </td></tr>
  157. <tr valign=top><td><b>module_name</b></td><td>
  158. <p>The name of the module.</p>
  159. </td></tr>
  160. <tr valign=top><td><b>module_version</b></td><td>
  161. <p>The version, as a 16.16 fixed number (major.minor).</p>
  162. </td></tr>
  163. <tr valign=top><td><b>module_requires</b></td><td>
  164. <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>
  165. </td></tr>
  166. <tr valign=top><td><b>module_init</b></td><td>
  167. <p>The initializing function.</p>
  168. </td></tr>
  169. <tr valign=top><td><b>module_done</b></td><td>
  170. <p>The finalizing function.</p>
  171. </td></tr>
  172. <tr valign=top><td><b>get_interface</b></td><td>
  173. <p>The interface requesting function.</p>
  174. </td></tr>
  175. </table>
  176. </td></tr></table>
  177. </td></tr></table>
  178. <hr width="75%">
  179. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  180. <td width="100%"></td>
  181. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  182. <table align=center width="75%"><tr><td>
  183. <h4><a name="FT_Add_Module">FT_Add_Module</a></h4>
  184. <table align=center width="87%"><tr><td>
  185. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  186. </td></tr></table><br>
  187. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  188. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  189. <b>FT_Add_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  190. <span class="keyword">const</span> <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a>* clazz );
  191. </pre></table><br>
  192. <table align=center width="87%"><tr><td>
  193. <p>Add a new module to a given library instance.</p>
  194. </td></tr></table><br>
  195. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  196. <p></p>
  197. <table cellpadding=3 border=0>
  198. <tr valign=top><td><b>library</b></td><td>
  199. <p>A handle to the library object.</p>
  200. </td></tr>
  201. </table>
  202. </td></tr></table>
  203. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  204. <p></p>
  205. <table cellpadding=3 border=0>
  206. <tr valign=top><td><b>clazz</b></td><td>
  207. <p>A pointer to class descriptor for the module.</p>
  208. </td></tr>
  209. </table>
  210. </td></tr></table>
  211. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  212. <p>FreeType error code. 0&nbsp;means success.</p>
  213. </td></tr></table>
  214. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  215. <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>
  216. </td></tr></table>
  217. </td></tr></table>
  218. <hr width="75%">
  219. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  220. <td width="100%"></td>
  221. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  222. <table align=center width="75%"><tr><td>
  223. <h4><a name="FT_Get_Module">FT_Get_Module</a></h4>
  224. <table align=center width="87%"><tr><td>
  225. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  226. </td></tr></table><br>
  227. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  228. FT_EXPORT( <a href="ft2-base_interface.html#FT_Module">FT_Module</a> )
  229. <b>FT_Get_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  230. <span class="keyword">const</span> <span class="keyword">char</span>* module_name );
  231. </pre></table><br>
  232. <table align=center width="87%"><tr><td>
  233. <p>Find a module by its name.</p>
  234. </td></tr></table><br>
  235. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  236. <p></p>
  237. <table cellpadding=3 border=0>
  238. <tr valign=top><td><b>library</b></td><td>
  239. <p>A handle to the library object.</p>
  240. </td></tr>
  241. <tr valign=top><td><b>module_name</b></td><td>
  242. <p>The module's name (as an ASCII string).</p>
  243. </td></tr>
  244. </table>
  245. </td></tr></table>
  246. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  247. <p>A module handle. 0&nbsp;if none was found.</p>
  248. </td></tr></table>
  249. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  250. <p>FreeType's internal modules aren't documented very well, and you should look up the source code for details.</p>
  251. </td></tr></table>
  252. </td></tr></table>
  253. <hr width="75%">
  254. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  255. <td width="100%"></td>
  256. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  257. <table align=center width="75%"><tr><td>
  258. <h4><a name="FT_Remove_Module">FT_Remove_Module</a></h4>
  259. <table align=center width="87%"><tr><td>
  260. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  261. </td></tr></table><br>
  262. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  263. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  264. <b>FT_Remove_Module</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  265. <a href="ft2-base_interface.html#FT_Module">FT_Module</a> module );
  266. </pre></table><br>
  267. <table align=center width="87%"><tr><td>
  268. <p>Remove a given module from a library instance.</p>
  269. </td></tr></table><br>
  270. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  271. <p></p>
  272. <table cellpadding=3 border=0>
  273. <tr valign=top><td><b>library</b></td><td>
  274. <p>A handle to a library object.</p>
  275. </td></tr>
  276. </table>
  277. </td></tr></table>
  278. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  279. <p></p>
  280. <table cellpadding=3 border=0>
  281. <tr valign=top><td><b>module</b></td><td>
  282. <p>A handle to a module object.</p>
  283. </td></tr>
  284. </table>
  285. </td></tr></table>
  286. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  287. <p>FreeType error code. 0&nbsp;means success.</p>
  288. </td></tr></table>
  289. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  290. <p>The module object is destroyed by the function in case of success.</p>
  291. </td></tr></table>
  292. </td></tr></table>
  293. <hr width="75%">
  294. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  295. <td width="100%"></td>
  296. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  297. <table align=center width="75%"><tr><td>
  298. <h4><a name="FT_Reference_Library">FT_Reference_Library</a></h4>
  299. <table align=center width="87%"><tr><td>
  300. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  301. </td></tr></table><br>
  302. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  303. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  304. <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
  305. </pre></table><br>
  306. <table align=center width="87%"><tr><td>
  307. <p>A counter gets initialized to&nbsp;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&nbsp;1, otherwise it simply decrements the counter.</p>
  308. <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>
  309. </td></tr></table><br>
  310. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  311. <p></p>
  312. <table cellpadding=3 border=0>
  313. <tr valign=top><td><b>library</b></td><td>
  314. <p>A handle to a target library object.</p>
  315. </td></tr>
  316. </table>
  317. </td></tr></table>
  318. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  319. <p>FreeType error code. 0&nbsp;means success.</p>
  320. </td></tr></table>
  321. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>since</b></em></td></tr><tr><td>
  322. <p>2.4.2</p>
  323. </td></tr></table>
  324. </td></tr></table>
  325. <hr width="75%">
  326. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  327. <td width="100%"></td>
  328. <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_New_Library">FT_New_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>
  335. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  336. <b>FT_New_Library</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
  337. <a href="ft2-base_interface.html#FT_Library">FT_Library</a> *alibrary );
  338. </pre></table><br>
  339. <table align=center width="87%"><tr><td>
  340. <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>
  341. <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>
  342. <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>
  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>
  345. <p></p>
  346. <table cellpadding=3 border=0>
  347. <tr valign=top><td><b>memory</b></td><td>
  348. <p>A handle to the original memory object.</p>
  349. </td></tr>
  350. </table>
  351. </td></tr></table>
  352. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  353. <p></p>
  354. <table cellpadding=3 border=0>
  355. <tr valign=top><td><b>alibrary</b></td><td>
  356. <p>A pointer to handle of a new library object.</p>
  357. </td></tr>
  358. </table>
  359. </td></tr></table>
  360. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  361. <p>FreeType error code. 0&nbsp;means success.</p>
  362. </td></tr></table>
  363. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  364. <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>
  365. </td></tr></table>
  366. </td></tr></table>
  367. <hr width="75%">
  368. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  369. <td width="100%"></td>
  370. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  371. <table align=center width="75%"><tr><td>
  372. <h4><a name="FT_Done_Library">FT_Done_Library</a></h4>
  373. <table align=center width="87%"><tr><td>
  374. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  375. </td></tr></table><br>
  376. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  377. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  378. <b>FT_Done_Library</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
  379. </pre></table><br>
  380. <table align=center width="87%"><tr><td>
  381. <p>Discard a given library object. This closes all drivers and discards all resource objects.</p>
  382. </td></tr></table><br>
  383. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  384. <p></p>
  385. <table cellpadding=3 border=0>
  386. <tr valign=top><td><b>library</b></td><td>
  387. <p>A handle to the target library.</p>
  388. </td></tr>
  389. </table>
  390. </td></tr></table>
  391. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  392. <p>FreeType error code. 0&nbsp;means success.</p>
  393. </td></tr></table>
  394. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  395. <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>
  396. </td></tr></table>
  397. </td></tr></table>
  398. <hr width="75%">
  399. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  400. <td width="100%"></td>
  401. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  402. <table align=center width="75%"><tr><td>
  403. <h4><a name="FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></h4>
  404. <table align=center width="87%"><tr><td>
  405. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  406. </td></tr></table><br>
  407. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  408. FT_EXPORT( <span class="keyword">void</span> )
  409. <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  410. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> hook_index,
  411. FT_DebugHook_Func debug_hook );
  412. </pre></table><br>
  413. <table align=center width="87%"><tr><td>
  414. <p>Set a debug hook function for debugging the interpreter of a font format.</p>
  415. </td></tr></table><br>
  416. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  417. <p></p>
  418. <table cellpadding=3 border=0>
  419. <tr valign=top><td><b>library</b></td><td>
  420. <p>A handle to the library object.</p>
  421. </td></tr>
  422. </table>
  423. </td></tr></table>
  424. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  425. <p></p>
  426. <table cellpadding=3 border=0>
  427. <tr valign=top><td><b>hook_index</b></td><td>
  428. <p>The index of the debug hook. You should use the values defined in &lsquo;ftobjs.h&rsquo;, e.g., &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo;.</p>
  429. </td></tr>
  430. <tr valign=top><td><b>debug_hook</b></td><td>
  431. <p>The function used to debug the interpreter.</p>
  432. </td></tr>
  433. </table>
  434. </td></tr></table>
  435. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  436. <p>Currently, four debug hook slots are available, but only two (for the TrueType and the Type&nbsp;1 interpreter) are defined.</p>
  437. <p>Since the internal headers of FreeType are no longer installed, the symbol &lsquo;FT_DEBUG_HOOK_TRUETYPE&rsquo; isn't available publicly. This is a bug and will be fixed in a forthcoming release.</p>
  438. </td></tr></table>
  439. </td></tr></table>
  440. <hr width="75%">
  441. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  442. <td width="100%"></td>
  443. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  444. <table align=center width="75%"><tr><td>
  445. <h4><a name="FT_Add_Default_Modules">FT_Add_Default_Modules</a></h4>
  446. <table align=center width="87%"><tr><td>
  447. Defined in FT_MODULE_H (freetype/ftmodapi.h).
  448. </td></tr></table><br>
  449. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  450. FT_EXPORT( <span class="keyword">void</span> )
  451. <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library );
  452. </pre></table><br>
  453. <table align=center width="87%"><tr><td>
  454. <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>
  455. </td></tr></table><br>
  456. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  457. <p></p>
  458. <table cellpadding=3 border=0>
  459. <tr valign=top><td><b>library</b></td><td>
  460. <p>A handle to a new library object.</p>
  461. </td></tr>
  462. </table>
  463. </td></tr></table>
  464. </td></tr></table>
  465. <hr width="75%">
  466. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  467. <td width="100%"></td>
  468. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  469. <table align=center width="75%"><tr><td>
  470. <h4><a name="FT_Renderer_Class">FT_Renderer_Class</a></h4>
  471. <table align=center width="87%"><tr><td>
  472. Defined in FT_RENDER_H (freetype/ftrender.h).
  473. </td></tr></table><br>
  474. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  475. <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Renderer_Class_
  476. {
  477. <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> root;
  478. <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> glyph_format;
  479. FT_Renderer_RenderFunc render_glyph;
  480. FT_Renderer_TransformFunc transform_glyph;
  481. FT_Renderer_GetCBoxFunc get_glyph_cbox;
  482. FT_Renderer_SetModeFunc set_mode;
  483. <a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a>* raster_class;
  484. } <b>FT_Renderer_Class</b>;
  485. </pre></table><br>
  486. <table align=center width="87%"><tr><td>
  487. <p>The renderer module class descriptor.</p>
  488. </td></tr></table><br>
  489. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
  490. <p></p>
  491. <table cellpadding=3 border=0>
  492. <tr valign=top><td><b>root</b></td><td>
  493. <p>The root <a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a> fields.</p>
  494. </td></tr>
  495. <tr valign=top><td><b>glyph_format</b></td><td>
  496. <p>The glyph image format this renderer handles.</p>
  497. </td></tr>
  498. <tr valign=top><td><b>render_glyph</b></td><td>
  499. <p>A method used to render the image that is in a given glyph slot into a bitmap.</p>
  500. </td></tr>
  501. <tr valign=top><td><b>transform_glyph</b></td><td>
  502. <p>A method used to transform the image that is in a given glyph slot.</p>
  503. </td></tr>
  504. <tr valign=top><td><b>get_glyph_cbox</b></td><td>
  505. <p>A method used to access the glyph's cbox.</p>
  506. </td></tr>
  507. <tr valign=top><td><b>set_mode</b></td><td>
  508. <p>A method used to pass additional parameters.</p>
  509. </td></tr>
  510. <tr valign=top><td><b>raster_class</b></td><td>
  511. <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>
  512. </td></tr>
  513. </table>
  514. </td></tr></table>
  515. </td></tr></table>
  516. <hr width="75%">
  517. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  518. <td width="100%"></td>
  519. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  520. <table align=center width="75%"><tr><td>
  521. <h4><a name="FT_Get_Renderer">FT_Get_Renderer</a></h4>
  522. <table align=center width="87%"><tr><td>
  523. Defined in FT_RENDER_H (freetype/ftrender.h).
  524. </td></tr></table><br>
  525. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  526. FT_EXPORT( <a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a> )
  527. <b>FT_Get_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  528. <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a> format );
  529. </pre></table><br>
  530. <table align=center width="87%"><tr><td>
  531. <p>Retrieve the current renderer for a given glyph format.</p>
  532. </td></tr></table><br>
  533. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  534. <p></p>
  535. <table cellpadding=3 border=0>
  536. <tr valign=top><td><b>library</b></td><td>
  537. <p>A handle to the library object.</p>
  538. </td></tr>
  539. <tr valign=top><td><b>format</b></td><td>
  540. <p>The glyph format.</p>
  541. </td></tr>
  542. </table>
  543. </td></tr></table>
  544. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  545. <p>A renderer handle. 0&nbsp;if none found.</p>
  546. </td></tr></table>
  547. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  548. <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>
  549. <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>
  550. </td></tr></table>
  551. </td></tr></table>
  552. <hr width="75%">
  553. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  554. <td width="100%"></td>
  555. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  556. <table align=center width="75%"><tr><td>
  557. <h4><a name="FT_Set_Renderer">FT_Set_Renderer</a></h4>
  558. <table align=center width="87%"><tr><td>
  559. Defined in FT_RENDER_H (freetype/ftrender.h).
  560. </td></tr></table><br>
  561. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  562. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  563. <b>FT_Set_Renderer</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  564. <a href="ft2-base_interface.html#FT_Renderer">FT_Renderer</a> renderer,
  565. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> num_params,
  566. <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>* parameters );
  567. </pre></table><br>
  568. <table align=center width="87%"><tr><td>
  569. <p>Set the current renderer to use, and set additional mode.</p>
  570. </td></tr></table><br>
  571. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  572. <p></p>
  573. <table cellpadding=3 border=0>
  574. <tr valign=top><td><b>library</b></td><td>
  575. <p>A handle to the library object.</p>
  576. </td></tr>
  577. </table>
  578. </td></tr></table>
  579. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  580. <p></p>
  581. <table cellpadding=3 border=0>
  582. <tr valign=top><td><b>renderer</b></td><td>
  583. <p>A handle to the renderer object.</p>
  584. </td></tr>
  585. <tr valign=top><td><b>num_params</b></td><td>
  586. <p>The number of additional parameters.</p>
  587. </td></tr>
  588. <tr valign=top><td><b>parameters</b></td><td>
  589. <p>Additional parameters.</p>
  590. </td></tr>
  591. </table>
  592. </td></tr></table>
  593. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  594. <p>FreeType error code. 0&nbsp;means success.</p>
  595. </td></tr></table>
  596. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  597. <p>In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.</p>
  598. <p>This doesn't change the current renderer for other formats.</p>
  599. </td></tr></table>
  600. </td></tr></table>
  601. <hr width="75%">
  602. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  603. <td width="100%"></td>
  604. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  605. </body>
  606. </html>