🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2235 lines
64 KiB

  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <meta name="description" content="API Reference Documentation for FreeType-2.11.0">
  7. <meta name="author" content="FreeType Contributors">
  8. <link rel="icon" href="images/favico.ico">
  9. <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9">
  10. <title>Module Management - FreeType-2.11.0 API Reference</title>
  11. <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css">
  12. <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css">
  13. <meta name="theme-color" content="#4cae4f">
  14. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  15. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback">
  16. <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style>
  17. <link rel="stylesheet" href="stylesheets/extra.css">
  18. </head>
  19. <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green">
  20. <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
  21. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  22. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  23. <label class="md-overlay" for="__drawer"></label>
  24. <div data-md-component="skip">
  25. <a href="#module-management" class="md-skip">
  26. Skip to content
  27. </a>
  28. </div>
  29. <div data-md-component="announce">
  30. </div>
  31. <header class="md-header" data-md-component="header">
  32. <nav class="md-header__inner md-grid" aria-label="Header">
  33. <a href="index.html" title="FreeType-2.11.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.11.0 API Reference" data-md-component="logo">
  34. <img src="images/favico.ico" alt="logo">
  35. </a>
  36. <label class="md-header__button md-icon" for="__drawer">
  37. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
  38. </label>
  39. <div class="md-header__title" data-md-component="header-title">
  40. <div class="md-header__ellipsis">
  41. <div class="md-header__topic">
  42. <span class="md-ellipsis">
  43. FreeType-2.11.0 API Reference
  44. </span>
  45. </div>
  46. <div class="md-header__topic" data-md-component="header-topic">
  47. <span class="md-ellipsis">
  48. Module Management
  49. </span>
  50. </div>
  51. </div>
  52. </div>
  53. <label class="md-header__button md-icon" for="__search">
  54. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
  55. </label>
  56. <div class="md-search" data-md-component="search" role="dialog">
  57. <label class="md-search__overlay" for="__search"></label>
  58. <div class="md-search__inner" role="search">
  59. <form class="md-search__form" name="search">
  60. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
  61. <label class="md-search__icon md-icon" for="__search">
  62. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
  63. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  64. </label>
  65. <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
  66. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
  67. </button>
  68. </form>
  69. <div class="md-search__output">
  70. <div class="md-search__scrollwrap" data-md-scrollfix>
  71. <div class="md-search-result" data-md-component="search-result">
  72. <div class="md-search-result__meta">
  73. Initializing search
  74. </div>
  75. <ol class="md-search-result__list"></ol>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </nav>
  82. </header>
  83. <div class="md-container" data-md-component="container">
  84. <main class="md-main" data-md-component="main">
  85. <div class="md-main__inner md-grid">
  86. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  87. <div class="md-sidebar__scrollwrap">
  88. <div class="md-sidebar__inner">
  89. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  90. <label class="md-nav__title" for="__drawer">
  91. <a href="index.html" title="FreeType-2.11.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.11.0 API Reference" data-md-component="logo">
  92. <img src="images/favico.ico" alt="logo">
  93. </a>
  94. FreeType-2.11.0 API Reference
  95. </label>
  96. <ul class="md-nav__list" data-md-scrollfix>
  97. <li class="md-nav__item">
  98. <a href="index.html" class="md-nav__link">
  99. TOC
  100. </a>
  101. </li>
  102. <li class="md-nav__item">
  103. <a href="ft2-index.html" class="md-nav__link">
  104. Index
  105. </a>
  106. </li>
  107. <li class="md-nav__item md-nav__item--nested">
  108. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
  109. <label class="md-nav__link" for="__nav_3">
  110. General Remarks
  111. <span class="md-nav__icon md-icon"></span>
  112. </label>
  113. <nav class="md-nav" aria-label="General Remarks" data-md-level="1">
  114. <label class="md-nav__title" for="__nav_3">
  115. <span class="md-nav__icon md-icon"></span>
  116. General Remarks
  117. </label>
  118. <ul class="md-nav__list" data-md-scrollfix>
  119. <li class="md-nav__item">
  120. <a href="ft2-preamble.html" class="md-nav__link">
  121. Preamble
  122. </a>
  123. </li>
  124. <li class="md-nav__item">
  125. <a href="ft2-header_inclusion.html" class="md-nav__link">
  126. FreeType's header inclusion scheme
  127. </a>
  128. </li>
  129. <li class="md-nav__item">
  130. <a href="ft2-user_allocation.html" class="md-nav__link">
  131. User allocation
  132. </a>
  133. </li>
  134. </ul>
  135. </nav>
  136. </li>
  137. <li class="md-nav__item md-nav__item--nested">
  138. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
  139. <label class="md-nav__link" for="__nav_4">
  140. Core API
  141. <span class="md-nav__icon md-icon"></span>
  142. </label>
  143. <nav class="md-nav" aria-label="Core API" data-md-level="1">
  144. <label class="md-nav__title" for="__nav_4">
  145. <span class="md-nav__icon md-icon"></span>
  146. Core API
  147. </label>
  148. <ul class="md-nav__list" data-md-scrollfix>
  149. <li class="md-nav__item">
  150. <a href="ft2-version.html" class="md-nav__link">
  151. FreeType Version
  152. </a>
  153. </li>
  154. <li class="md-nav__item">
  155. <a href="ft2-basic_types.html" class="md-nav__link">
  156. Basic Data Types
  157. </a>
  158. </li>
  159. <li class="md-nav__item">
  160. <a href="ft2-base_interface.html" class="md-nav__link">
  161. Base Interface
  162. </a>
  163. </li>
  164. <li class="md-nav__item">
  165. <a href="ft2-glyph_variants.html" class="md-nav__link">
  166. Unicode Variation Sequences
  167. </a>
  168. </li>
  169. <li class="md-nav__item">
  170. <a href="ft2-color_management.html" class="md-nav__link">
  171. Glyph Color Management
  172. </a>
  173. </li>
  174. <li class="md-nav__item">
  175. <a href="ft2-layer_management.html" class="md-nav__link">
  176. Glyph Layer Management
  177. </a>
  178. </li>
  179. <li class="md-nav__item">
  180. <a href="ft2-glyph_management.html" class="md-nav__link">
  181. Glyph Management
  182. </a>
  183. </li>
  184. <li class="md-nav__item">
  185. <a href="ft2-mac_specific.html" class="md-nav__link">
  186. Mac Specific Interface
  187. </a>
  188. </li>
  189. <li class="md-nav__item">
  190. <a href="ft2-sizes_management.html" class="md-nav__link">
  191. Size Management
  192. </a>
  193. </li>
  194. <li class="md-nav__item">
  195. <a href="ft2-header_file_macros.html" class="md-nav__link">
  196. Header File Macros
  197. </a>
  198. </li>
  199. </ul>
  200. </nav>
  201. </li>
  202. <li class="md-nav__item md-nav__item--nested">
  203. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
  204. <label class="md-nav__link" for="__nav_5">
  205. Format-Specific API
  206. <span class="md-nav__icon md-icon"></span>
  207. </label>
  208. <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1">
  209. <label class="md-nav__title" for="__nav_5">
  210. <span class="md-nav__icon md-icon"></span>
  211. Format-Specific API
  212. </label>
  213. <ul class="md-nav__list" data-md-scrollfix>
  214. <li class="md-nav__item">
  215. <a href="ft2-multiple_masters.html" class="md-nav__link">
  216. Multiple Masters
  217. </a>
  218. </li>
  219. <li class="md-nav__item">
  220. <a href="ft2-truetype_tables.html" class="md-nav__link">
  221. TrueType Tables
  222. </a>
  223. </li>
  224. <li class="md-nav__item">
  225. <a href="ft2-type1_tables.html" class="md-nav__link">
  226. Type 1 Tables
  227. </a>
  228. </li>
  229. <li class="md-nav__item">
  230. <a href="ft2-sfnt_names.html" class="md-nav__link">
  231. SFNT Names
  232. </a>
  233. </li>
  234. <li class="md-nav__item">
  235. <a href="ft2-bdf_fonts.html" class="md-nav__link">
  236. BDF and PCF Files
  237. </a>
  238. </li>
  239. <li class="md-nav__item">
  240. <a href="ft2-cid_fonts.html" class="md-nav__link">
  241. CID Fonts
  242. </a>
  243. </li>
  244. <li class="md-nav__item">
  245. <a href="ft2-pfr_fonts.html" class="md-nav__link">
  246. PFR Fonts
  247. </a>
  248. </li>
  249. <li class="md-nav__item">
  250. <a href="ft2-winfnt_fonts.html" class="md-nav__link">
  251. Window FNT Files
  252. </a>
  253. </li>
  254. <li class="md-nav__item">
  255. <a href="ft2-font_formats.html" class="md-nav__link">
  256. Font Formats
  257. </a>
  258. </li>
  259. <li class="md-nav__item">
  260. <a href="ft2-gasp_table.html" class="md-nav__link">
  261. Gasp Table
  262. </a>
  263. </li>
  264. </ul>
  265. </nav>
  266. </li>
  267. <li class="md-nav__item md-nav__item--nested">
  268. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
  269. <label class="md-nav__link" for="__nav_6">
  270. Controlling FreeType Modules
  271. <span class="md-nav__icon md-icon"></span>
  272. </label>
  273. <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1">
  274. <label class="md-nav__title" for="__nav_6">
  275. <span class="md-nav__icon md-icon"></span>
  276. Controlling FreeType Modules
  277. </label>
  278. <ul class="md-nav__list" data-md-scrollfix>
  279. <li class="md-nav__item">
  280. <a href="ft2-auto_hinter.html" class="md-nav__link">
  281. The auto-hinter
  282. </a>
  283. </li>
  284. <li class="md-nav__item">
  285. <a href="ft2-cff_driver.html" class="md-nav__link">
  286. The CFF driver
  287. </a>
  288. </li>
  289. <li class="md-nav__item">
  290. <a href="ft2-t1_cid_driver.html" class="md-nav__link">
  291. The Type 1 and CID drivers
  292. </a>
  293. </li>
  294. <li class="md-nav__item">
  295. <a href="ft2-tt_driver.html" class="md-nav__link">
  296. The TrueType driver
  297. </a>
  298. </li>
  299. <li class="md-nav__item">
  300. <a href="ft2-pcf_driver.html" class="md-nav__link">
  301. The PCF driver
  302. </a>
  303. </li>
  304. <li class="md-nav__item">
  305. <a href="ft2-properties.html" class="md-nav__link">
  306. Driver properties
  307. </a>
  308. </li>
  309. <li class="md-nav__item">
  310. <a href="ft2-parameter_tags.html" class="md-nav__link">
  311. Parameter Tags
  312. </a>
  313. </li>
  314. <li class="md-nav__item">
  315. <a href="ft2-lcd_rendering.html" class="md-nav__link">
  316. Subpixel Rendering
  317. </a>
  318. </li>
  319. </ul>
  320. </nav>
  321. </li>
  322. <li class="md-nav__item md-nav__item--nested">
  323. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
  324. <label class="md-nav__link" for="__nav_7">
  325. Cache Sub-System
  326. <span class="md-nav__icon md-icon"></span>
  327. </label>
  328. <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1">
  329. <label class="md-nav__title" for="__nav_7">
  330. <span class="md-nav__icon md-icon"></span>
  331. Cache Sub-System
  332. </label>
  333. <ul class="md-nav__list" data-md-scrollfix>
  334. <li class="md-nav__item">
  335. <a href="ft2-cache_subsystem.html" class="md-nav__link">
  336. Cache Sub-System
  337. </a>
  338. </li>
  339. </ul>
  340. </nav>
  341. </li>
  342. <li class="md-nav__item md-nav__item--active md-nav__item--nested">
  343. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked>
  344. <label class="md-nav__link" for="__nav_8">
  345. Support API
  346. <span class="md-nav__icon md-icon"></span>
  347. </label>
  348. <nav class="md-nav" aria-label="Support API" data-md-level="1">
  349. <label class="md-nav__title" for="__nav_8">
  350. <span class="md-nav__icon md-icon"></span>
  351. Support API
  352. </label>
  353. <ul class="md-nav__list" data-md-scrollfix>
  354. <li class="md-nav__item">
  355. <a href="ft2-computations.html" class="md-nav__link">
  356. Computations
  357. </a>
  358. </li>
  359. <li class="md-nav__item">
  360. <a href="ft2-list_processing.html" class="md-nav__link">
  361. List Processing
  362. </a>
  363. </li>
  364. <li class="md-nav__item">
  365. <a href="ft2-outline_processing.html" class="md-nav__link">
  366. Outline Processing
  367. </a>
  368. </li>
  369. <li class="md-nav__item">
  370. <a href="ft2-quick_advance.html" class="md-nav__link">
  371. Quick retrieval of advance values
  372. </a>
  373. </li>
  374. <li class="md-nav__item">
  375. <a href="ft2-bitmap_handling.html" class="md-nav__link">
  376. Bitmap Handling
  377. </a>
  378. </li>
  379. <li class="md-nav__item">
  380. <a href="ft2-raster.html" class="md-nav__link">
  381. Scanline Converter
  382. </a>
  383. </li>
  384. <li class="md-nav__item">
  385. <a href="ft2-glyph_stroker.html" class="md-nav__link">
  386. Glyph Stroker
  387. </a>
  388. </li>
  389. <li class="md-nav__item">
  390. <a href="ft2-system_interface.html" class="md-nav__link">
  391. System Interface
  392. </a>
  393. </li>
  394. <li class="md-nav__item md-nav__item--active">
  395. <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
  396. <label class="md-nav__link md-nav__link--active" for="__toc">
  397. Module Management
  398. <span class="md-nav__icon md-icon"></span>
  399. </label>
  400. <a href="ft2-module_management.html" class="md-nav__link md-nav__link--active">
  401. Module Management
  402. </a>
  403. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  404. <label class="md-nav__title" for="__toc">
  405. <span class="md-nav__icon md-icon"></span>
  406. Table of contents
  407. </label>
  408. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  409. <li class="md-nav__item">
  410. <a href="#synopsis" class="md-nav__link">
  411. Synopsis
  412. </a>
  413. </li>
  414. <li class="md-nav__item">
  415. <a href="#ft_module" class="md-nav__link">
  416. FT_Module
  417. </a>
  418. </li>
  419. <li class="md-nav__item">
  420. <a href="#ft_module_constructor" class="md-nav__link">
  421. FT_Module_Constructor
  422. </a>
  423. </li>
  424. <li class="md-nav__item">
  425. <a href="#ft_module_destructor" class="md-nav__link">
  426. FT_Module_Destructor
  427. </a>
  428. </li>
  429. <li class="md-nav__item">
  430. <a href="#ft_module_requester" class="md-nav__link">
  431. FT_Module_Requester
  432. </a>
  433. </li>
  434. <li class="md-nav__item">
  435. <a href="#ft_module_class" class="md-nav__link">
  436. FT_Module_Class
  437. </a>
  438. </li>
  439. <li class="md-nav__item">
  440. <a href="#ft_add_module" class="md-nav__link">
  441. FT_Add_Module
  442. </a>
  443. </li>
  444. <li class="md-nav__item">
  445. <a href="#ft_get_module" class="md-nav__link">
  446. FT_Get_Module
  447. </a>
  448. </li>
  449. <li class="md-nav__item">
  450. <a href="#ft_remove_module" class="md-nav__link">
  451. FT_Remove_Module
  452. </a>
  453. </li>
  454. <li class="md-nav__item">
  455. <a href="#ft_add_default_modules" class="md-nav__link">
  456. FT_Add_Default_Modules
  457. </a>
  458. </li>
  459. <li class="md-nav__item">
  460. <a href="#ft_face_driver_name" class="md-nav__link">
  461. FT_FACE_DRIVER_NAME
  462. </a>
  463. </li>
  464. <li class="md-nav__item">
  465. <a href="#ft_property_set" class="md-nav__link">
  466. FT_Property_Set
  467. </a>
  468. </li>
  469. <li class="md-nav__item">
  470. <a href="#ft_property_get" class="md-nav__link">
  471. FT_Property_Get
  472. </a>
  473. </li>
  474. <li class="md-nav__item">
  475. <a href="#ft_set_default_properties" class="md-nav__link">
  476. FT_Set_Default_Properties
  477. </a>
  478. </li>
  479. <li class="md-nav__item">
  480. <a href="#ft_new_library" class="md-nav__link">
  481. FT_New_Library
  482. </a>
  483. </li>
  484. <li class="md-nav__item">
  485. <a href="#ft_done_library" class="md-nav__link">
  486. FT_Done_Library
  487. </a>
  488. </li>
  489. <li class="md-nav__item">
  490. <a href="#ft_reference_library" class="md-nav__link">
  491. FT_Reference_Library
  492. </a>
  493. </li>
  494. <li class="md-nav__item">
  495. <a href="#ft_renderer" class="md-nav__link">
  496. FT_Renderer
  497. </a>
  498. </li>
  499. <li class="md-nav__item">
  500. <a href="#ft_renderer_class" class="md-nav__link">
  501. FT_Renderer_Class
  502. </a>
  503. </li>
  504. <li class="md-nav__item">
  505. <a href="#ft_get_renderer" class="md-nav__link">
  506. FT_Get_Renderer
  507. </a>
  508. </li>
  509. <li class="md-nav__item">
  510. <a href="#ft_set_renderer" class="md-nav__link">
  511. FT_Set_Renderer
  512. </a>
  513. </li>
  514. <li class="md-nav__item">
  515. <a href="#ft_set_debug_hook" class="md-nav__link">
  516. FT_Set_Debug_Hook
  517. </a>
  518. </li>
  519. <li class="md-nav__item">
  520. <a href="#ft_driver" class="md-nav__link">
  521. FT_Driver
  522. </a>
  523. </li>
  524. <li class="md-nav__item">
  525. <a href="#ft_debughook_func" class="md-nav__link">
  526. FT_DebugHook_Func
  527. </a>
  528. </li>
  529. <li class="md-nav__item">
  530. <a href="#ft_debug_hook_xxx" class="md-nav__link">
  531. FT_DEBUG_HOOK_XXX
  532. </a>
  533. </li>
  534. </ul>
  535. </nav>
  536. </li>
  537. <li class="md-nav__item">
  538. <a href="ft2-gzip.html" class="md-nav__link">
  539. GZIP Streams
  540. </a>
  541. </li>
  542. <li class="md-nav__item">
  543. <a href="ft2-lzw.html" class="md-nav__link">
  544. LZW Streams
  545. </a>
  546. </li>
  547. <li class="md-nav__item">
  548. <a href="ft2-bzip2.html" class="md-nav__link">
  549. BZIP2 Streams
  550. </a>
  551. </li>
  552. <li class="md-nav__item">
  553. <a href="ft2-debugging_apis.html" class="md-nav__link">
  554. External Debugging APIs
  555. </a>
  556. </li>
  557. </ul>
  558. </nav>
  559. </li>
  560. <li class="md-nav__item md-nav__item--nested">
  561. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
  562. <label class="md-nav__link" for="__nav_9">
  563. Error Codes
  564. <span class="md-nav__icon md-icon"></span>
  565. </label>
  566. <nav class="md-nav" aria-label="Error Codes" data-md-level="1">
  567. <label class="md-nav__title" for="__nav_9">
  568. <span class="md-nav__icon md-icon"></span>
  569. Error Codes
  570. </label>
  571. <ul class="md-nav__list" data-md-scrollfix>
  572. <li class="md-nav__item">
  573. <a href="ft2-error_enumerations.html" class="md-nav__link">
  574. Error Enumerations
  575. </a>
  576. </li>
  577. <li class="md-nav__item">
  578. <a href="ft2-error_code_values.html" class="md-nav__link">
  579. Error Code Values
  580. </a>
  581. </li>
  582. </ul>
  583. </nav>
  584. </li>
  585. <li class="md-nav__item md-nav__item--nested">
  586. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
  587. <label class="md-nav__link" for="__nav_10">
  588. Miscellaneous
  589. <span class="md-nav__icon md-icon"></span>
  590. </label>
  591. <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1">
  592. <label class="md-nav__title" for="__nav_10">
  593. <span class="md-nav__icon md-icon"></span>
  594. Miscellaneous
  595. </label>
  596. <ul class="md-nav__list" data-md-scrollfix>
  597. <li class="md-nav__item">
  598. <a href="ft2-gx_validation.html" class="md-nav__link">
  599. TrueTypeGX/AAT Validation
  600. </a>
  601. </li>
  602. <li class="md-nav__item">
  603. <a href="ft2-incremental.html" class="md-nav__link">
  604. Incremental Loading
  605. </a>
  606. </li>
  607. <li class="md-nav__item">
  608. <a href="ft2-truetype_engine.html" class="md-nav__link">
  609. The TrueType Engine
  610. </a>
  611. </li>
  612. <li class="md-nav__item">
  613. <a href="ft2-ot_validation.html" class="md-nav__link">
  614. OpenType Validation
  615. </a>
  616. </li>
  617. </ul>
  618. </nav>
  619. </li>
  620. </ul>
  621. </nav>
  622. </div>
  623. </div>
  624. </div>
  625. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  626. <div class="md-sidebar__scrollwrap">
  627. <div class="md-sidebar__inner">
  628. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  629. <label class="md-nav__title" for="__toc">
  630. <span class="md-nav__icon md-icon"></span>
  631. Table of contents
  632. </label>
  633. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  634. <li class="md-nav__item">
  635. <a href="#synopsis" class="md-nav__link">
  636. Synopsis
  637. </a>
  638. </li>
  639. <li class="md-nav__item">
  640. <a href="#ft_module" class="md-nav__link">
  641. FT_Module
  642. </a>
  643. </li>
  644. <li class="md-nav__item">
  645. <a href="#ft_module_constructor" class="md-nav__link">
  646. FT_Module_Constructor
  647. </a>
  648. </li>
  649. <li class="md-nav__item">
  650. <a href="#ft_module_destructor" class="md-nav__link">
  651. FT_Module_Destructor
  652. </a>
  653. </li>
  654. <li class="md-nav__item">
  655. <a href="#ft_module_requester" class="md-nav__link">
  656. FT_Module_Requester
  657. </a>
  658. </li>
  659. <li class="md-nav__item">
  660. <a href="#ft_module_class" class="md-nav__link">
  661. FT_Module_Class
  662. </a>
  663. </li>
  664. <li class="md-nav__item">
  665. <a href="#ft_add_module" class="md-nav__link">
  666. FT_Add_Module
  667. </a>
  668. </li>
  669. <li class="md-nav__item">
  670. <a href="#ft_get_module" class="md-nav__link">
  671. FT_Get_Module
  672. </a>
  673. </li>
  674. <li class="md-nav__item">
  675. <a href="#ft_remove_module" class="md-nav__link">
  676. FT_Remove_Module
  677. </a>
  678. </li>
  679. <li class="md-nav__item">
  680. <a href="#ft_add_default_modules" class="md-nav__link">
  681. FT_Add_Default_Modules
  682. </a>
  683. </li>
  684. <li class="md-nav__item">
  685. <a href="#ft_face_driver_name" class="md-nav__link">
  686. FT_FACE_DRIVER_NAME
  687. </a>
  688. </li>
  689. <li class="md-nav__item">
  690. <a href="#ft_property_set" class="md-nav__link">
  691. FT_Property_Set
  692. </a>
  693. </li>
  694. <li class="md-nav__item">
  695. <a href="#ft_property_get" class="md-nav__link">
  696. FT_Property_Get
  697. </a>
  698. </li>
  699. <li class="md-nav__item">
  700. <a href="#ft_set_default_properties" class="md-nav__link">
  701. FT_Set_Default_Properties
  702. </a>
  703. </li>
  704. <li class="md-nav__item">
  705. <a href="#ft_new_library" class="md-nav__link">
  706. FT_New_Library
  707. </a>
  708. </li>
  709. <li class="md-nav__item">
  710. <a href="#ft_done_library" class="md-nav__link">
  711. FT_Done_Library
  712. </a>
  713. </li>
  714. <li class="md-nav__item">
  715. <a href="#ft_reference_library" class="md-nav__link">
  716. FT_Reference_Library
  717. </a>
  718. </li>
  719. <li class="md-nav__item">
  720. <a href="#ft_renderer" class="md-nav__link">
  721. FT_Renderer
  722. </a>
  723. </li>
  724. <li class="md-nav__item">
  725. <a href="#ft_renderer_class" class="md-nav__link">
  726. FT_Renderer_Class
  727. </a>
  728. </li>
  729. <li class="md-nav__item">
  730. <a href="#ft_get_renderer" class="md-nav__link">
  731. FT_Get_Renderer
  732. </a>
  733. </li>
  734. <li class="md-nav__item">
  735. <a href="#ft_set_renderer" class="md-nav__link">
  736. FT_Set_Renderer
  737. </a>
  738. </li>
  739. <li class="md-nav__item">
  740. <a href="#ft_set_debug_hook" class="md-nav__link">
  741. FT_Set_Debug_Hook
  742. </a>
  743. </li>
  744. <li class="md-nav__item">
  745. <a href="#ft_driver" class="md-nav__link">
  746. FT_Driver
  747. </a>
  748. </li>
  749. <li class="md-nav__item">
  750. <a href="#ft_debughook_func" class="md-nav__link">
  751. FT_DebugHook_Func
  752. </a>
  753. </li>
  754. <li class="md-nav__item">
  755. <a href="#ft_debug_hook_xxx" class="md-nav__link">
  756. FT_DEBUG_HOOK_XXX
  757. </a>
  758. </li>
  759. </ul>
  760. </nav>
  761. </div>
  762. </div>
  763. </div>
  764. <div class="md-content" data-md-component="content">
  765. <article class="md-content__inner md-typeset">
  766. <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Module Management</p>
  767. <hr />
  768. <h1 id="module-management">Module Management<a class="headerlink" href="#module-management" title="Permanent link">&para;</a></h1>
  769. <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
  770. <p>The definitions below are used to manage modules within FreeType. Internal and external modules can be added, upgraded, and removed at runtime. For example, an alternative renderer or proprietary font driver can be registered and prioritized. Additionally, some module properties can also be controlled.</p>
  771. <p>Here is a list of existing values of the <code>module_name</code> field in the <code><a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a></code> structure.
  772. <div class="highlight"><pre><span></span><code> autofitter
  773. bdf
  774. cff
  775. gxvalid
  776. otvalid
  777. pcf
  778. pfr
  779. psaux
  780. pshinter
  781. psnames
  782. raster1
  783. sfnt
  784. smooth
  785. truetype
  786. type1
  787. type42
  788. t1cid
  789. winfonts
  790. </code></pre></div></p>
  791. <p>Note that the FreeType Cache sub-system is not a FreeType module.</p>
  792. <h2 id="ft_module">FT_Module<a class="headerlink" href="#ft_module" title="Permanent link">&para;</a></h2>
  793. <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
  794. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_* <b>FT_Module</b>;
  795. </code></pre></div>
  796. <p>A handle to a given FreeType module object. A module can be a font driver, a renderer, or anything else that provides services to the former.</p>
  797. <hr>
  798. <h2 id="ft_module_constructor">FT_Module_Constructor<a class="headerlink" href="#ft_module_constructor" title="Permanent link">&para;</a></h2>
  799. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  800. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a>
  801. (*<b>FT_Module_Constructor</b>)( <a href="ft2-module_management.html#ft_module">FT_Module</a> module );
  802. </code></pre></div>
  803. <p>A function used to initialize (not create) a new module object.</p>
  804. <h4>input</h4>
  805. <table class="fields">
  806. <tr><td class="val" id="module">module</td><td class="desc">
  807. <p>The module to initialize.</p>
  808. </td></tr>
  809. </table>
  810. <hr>
  811. <h2 id="ft_module_destructor">FT_Module_Destructor<a class="headerlink" href="#ft_module_destructor" title="Permanent link">&para;</a></h2>
  812. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  813. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span>
  814. (*<b>FT_Module_Destructor</b>)( <a href="ft2-module_management.html#ft_module">FT_Module</a> module );
  815. </code></pre></div>
  816. <p>A function used to finalize (not destroy) a given module object.</p>
  817. <h4>input</h4>
  818. <table class="fields">
  819. <tr><td class="val" id="module">module</td><td class="desc">
  820. <p>The module to finalize.</p>
  821. </td></tr>
  822. </table>
  823. <hr>
  824. <h2 id="ft_module_requester">FT_Module_Requester<a class="headerlink" href="#ft_module_requester" title="Permanent link">&para;</a></h2>
  825. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  826. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> FT_Module_Interface
  827. (*<b>FT_Module_Requester</b>)( <a href="ft2-module_management.html#ft_module">FT_Module</a> module,
  828. <span class="keyword">const</span> <span class="keyword">char</span>* name );
  829. </code></pre></div>
  830. <p>A function used to query a given module for a specific interface.</p>
  831. <h4>input</h4>
  832. <table class="fields">
  833. <tr><td class="val" id="module">module</td><td class="desc">
  834. <p>The module to be searched.</p>
  835. </td></tr>
  836. <tr><td class="val" id="name">name</td><td class="desc">
  837. <p>The name of the interface in the module.</p>
  838. </td></tr>
  839. </table>
  840. <hr>
  841. <h2 id="ft_module_class">FT_Module_Class<a class="headerlink" href="#ft_module_class" title="Permanent link">&para;</a></h2>
  842. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  843. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Module_Class_
  844. {
  845. <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> module_flags;
  846. <a href="ft2-basic_types.html#ft_long">FT_Long</a> module_size;
  847. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* module_name;
  848. <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> module_version;
  849. <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> module_requires;
  850. <span class="keyword">const</span> <span class="keyword">void</span>* module_interface;
  851. <a href="ft2-module_management.html#ft_module_constructor">FT_Module_Constructor</a> module_init;
  852. <a href="ft2-module_management.html#ft_module_destructor">FT_Module_Destructor</a> module_done;
  853. <a href="ft2-module_management.html#ft_module_requester">FT_Module_Requester</a> get_interface;
  854. } <b>FT_Module_Class</b>;
  855. </code></pre></div>
  856. <p>The module class descriptor. While being a public structure necessary for FreeType's module bookkeeping, most of the fields are essentially internal, not to be used directly by an application.</p>
  857. <h4>fields</h4>
  858. <table class="fields">
  859. <tr><td class="val" id="module_flags">module_flags</td><td class="desc">
  860. <p>Bit flags describing the module.</p>
  861. </td></tr>
  862. <tr><td class="val" id="module_size">module_size</td><td class="desc">
  863. <p>The size of one module object/instance in bytes.</p>
  864. </td></tr>
  865. <tr><td class="val" id="module_name">module_name</td><td class="desc">
  866. <p>The name of the module.</p>
  867. </td></tr>
  868. <tr><td class="val" id="module_version">module_version</td><td class="desc">
  869. <p>The version, as a 16.16 fixed number (major.minor).</p>
  870. </td></tr>
  871. <tr><td class="val" id="module_requires">module_requires</td><td class="desc">
  872. <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>
  873. </td></tr>
  874. <tr><td class="val" id="module_interface">module_interface</td><td class="desc">
  875. <p>A typeless pointer to a structure (which varies between different modules) that holds the module's interface functions. This is essentially what <code>get_interface</code> returns.</p>
  876. </td></tr>
  877. <tr><td class="val" id="module_init">module_init</td><td class="desc">
  878. <p>The initializing function.</p>
  879. </td></tr>
  880. <tr><td class="val" id="module_done">module_done</td><td class="desc">
  881. <p>The finalizing function.</p>
  882. </td></tr>
  883. <tr><td class="val" id="get_interface">get_interface</td><td class="desc">
  884. <p>The interface requesting function.</p>
  885. </td></tr>
  886. </table>
  887. <hr>
  888. <h2 id="ft_add_module">FT_Add_Module<a class="headerlink" href="#ft_add_module" title="Permanent link">&para;</a></h2>
  889. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  890. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  891. <b>FT_Add_Module</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  892. <span class="keyword">const</span> <a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a>* clazz );
  893. </code></pre></div>
  894. <p>Add a new module to a given library instance.</p>
  895. <h4>inout</h4>
  896. <table class="fields">
  897. <tr><td class="val" id="library">library</td><td class="desc">
  898. <p>A handle to the library object.</p>
  899. </td></tr>
  900. </table>
  901. <h4>input</h4>
  902. <table class="fields">
  903. <tr><td class="val" id="clazz">clazz</td><td class="desc">
  904. <p>A pointer to class descriptor for the module.</p>
  905. </td></tr>
  906. </table>
  907. <h4>return</h4>
  908. <p>FreeType error code. 0&nbsp;means success.</p>
  909. <h4>note</h4>
  910. <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>
  911. <hr>
  912. <h2 id="ft_get_module">FT_Get_Module<a class="headerlink" href="#ft_get_module" title="Permanent link">&para;</a></h2>
  913. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  914. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-module_management.html#ft_module">FT_Module</a> )
  915. <b>FT_Get_Module</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  916. <span class="keyword">const</span> <span class="keyword">char</span>* module_name );
  917. </code></pre></div>
  918. <p>Find a module by its name.</p>
  919. <h4>input</h4>
  920. <table class="fields">
  921. <tr><td class="val" id="library">library</td><td class="desc">
  922. <p>A handle to the library object.</p>
  923. </td></tr>
  924. <tr><td class="val" id="module_name">module_name</td><td class="desc">
  925. <p>The module's name (as an ASCII string).</p>
  926. </td></tr>
  927. </table>
  928. <h4>return</h4>
  929. <p>A module handle. 0&nbsp;if none was found.</p>
  930. <h4>note</h4>
  931. <p>FreeType's internal modules aren't documented very well, and you should look up the source code for details.</p>
  932. <hr>
  933. <h2 id="ft_remove_module">FT_Remove_Module<a class="headerlink" href="#ft_remove_module" title="Permanent link">&para;</a></h2>
  934. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  935. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  936. <b>FT_Remove_Module</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  937. <a href="ft2-module_management.html#ft_module">FT_Module</a> module );
  938. </code></pre></div>
  939. <p>Remove a given module from a library instance.</p>
  940. <h4>inout</h4>
  941. <table class="fields">
  942. <tr><td class="val" id="library">library</td><td class="desc">
  943. <p>A handle to a library object.</p>
  944. </td></tr>
  945. </table>
  946. <h4>input</h4>
  947. <table class="fields">
  948. <tr><td class="val" id="module">module</td><td class="desc">
  949. <p>A handle to a module object.</p>
  950. </td></tr>
  951. </table>
  952. <h4>return</h4>
  953. <p>FreeType error code. 0&nbsp;means success.</p>
  954. <h4>note</h4>
  955. <p>The module object is destroyed by the function in case of success.</p>
  956. <hr>
  957. <h2 id="ft_add_default_modules">FT_Add_Default_Modules<a class="headerlink" href="#ft_add_default_modules" title="Permanent link">&para;</a></h2>
  958. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  959. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  960. <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library );
  961. </code></pre></div>
  962. <p>Add the set of default drivers to a given library object. This is only useful when you create a library object with <code><a href="ft2-module_management.html#ft_new_library">FT_New_Library</a></code> (usually to plug a custom memory manager).</p>
  963. <h4>inout</h4>
  964. <table class="fields">
  965. <tr><td class="val" id="library">library</td><td class="desc">
  966. <p>A handle to a new library object.</p>
  967. </td></tr>
  968. </table>
  969. <hr>
  970. <h2 id="ft_face_driver_name">FT_FACE_DRIVER_NAME<a class="headerlink" href="#ft_face_driver_name" title="Permanent link">&para;</a></h2>
  971. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  972. <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_FACE_DRIVER_NAME</b>( face ) \
  973. ( ( *(<a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a>**)( ( face )-&gt;driver ) )-&gt;module_name )
  974. </code></pre></div>
  975. <p>A macro that retrieves the name of a font driver from a face object.</p>
  976. <h4>note</h4>
  977. <p>The font driver name is a valid <code>module_name</code> for <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>. This is not the same as <code><a href="ft2-font_formats.html#ft_get_font_format">FT_Get_Font_Format</a></code>.</p>
  978. <h4>since</h4>
  979. <p>2.11</p>
  980. <hr>
  981. <h2 id="ft_property_set">FT_Property_Set<a class="headerlink" href="#ft_property_set" title="Permanent link">&para;</a></h2>
  982. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  983. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  984. <b>FT_Property_Set</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  985. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* module_name,
  986. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* property_name,
  987. <span class="keyword">const</span> <span class="keyword">void</span>* value );
  988. </code></pre></div>
  989. <p>Set a property for a given module.</p>
  990. <h4>input</h4>
  991. <table class="fields">
  992. <tr><td class="val" id="library">library</td><td class="desc">
  993. <p>A handle to the library the module is part of.</p>
  994. </td></tr>
  995. <tr><td class="val" id="module_name">module_name</td><td class="desc">
  996. <p>The module name.</p>
  997. </td></tr>
  998. <tr><td class="val" id="property_name">property_name</td><td class="desc">
  999. <p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
  1000. <p>Note that only a few modules have properties.</p>
  1001. </td></tr>
  1002. <tr><td class="val" id="value">value</td><td class="desc">
  1003. <p>A generic pointer to a variable or structure that gives the new value of the property. The exact definition of <code>value</code> is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
  1004. </td></tr>
  1005. </table>
  1006. <h4>return</h4>
  1007. <p>FreeType error code. 0&nbsp;means success.</p>
  1008. <h4>note</h4>
  1009. <p>If <code>module_name</code> isn't a valid module name, or <code>property_name</code> doesn't specify a valid property, or if <code>value</code> doesn't represent a valid value for the given property, an error is returned.</p>
  1010. <p>The following example sets property &lsquo;bar&rsquo; (a simple integer) in module &lsquo;foo&rsquo; to value&nbsp;1.
  1011. <div class="highlight"><pre><span></span><code> FT_UInt bar;
  1012. bar = 1;
  1013. FT_Property_Set( library, &quot;foo&quot;, &quot;bar&quot;, &amp;bar );
  1014. </code></pre></div></p>
  1015. <p>Note that the FreeType Cache sub-system doesn't recognize module property changes. To avoid glyph lookup confusion within the cache you should call <code><a href="ft2-cache_subsystem.html#ftc_manager_reset">FTC_Manager_Reset</a></code> to completely flush the cache if a module property gets changed after <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code> has been called.</p>
  1016. <p>It is not possible to set properties of the FreeType Cache sub-system itself with FT_Property_Set; use ?FTC_Property_Set? instead.</p>
  1017. <h4>since</h4>
  1018. <p>2.4.11</p>
  1019. <hr>
  1020. <h2 id="ft_property_get">FT_Property_Get<a class="headerlink" href="#ft_property_get" title="Permanent link">&para;</a></h2>
  1021. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1022. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1023. <b>FT_Property_Get</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  1024. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* module_name,
  1025. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* property_name,
  1026. <span class="keyword">void</span>* value );
  1027. </code></pre></div>
  1028. <p>Get a module's property value.</p>
  1029. <h4>input</h4>
  1030. <table class="fields">
  1031. <tr><td class="val" id="library">library</td><td class="desc">
  1032. <p>A handle to the library the module is part of.</p>
  1033. </td></tr>
  1034. <tr><td class="val" id="module_name">module_name</td><td class="desc">
  1035. <p>The module name.</p>
  1036. </td></tr>
  1037. <tr><td class="val" id="property_name">property_name</td><td class="desc">
  1038. <p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
  1039. </td></tr>
  1040. </table>
  1041. <h4>inout</h4>
  1042. <table class="fields">
  1043. <tr><td class="val" id="value">value</td><td class="desc">
  1044. <p>A generic pointer to a variable or structure that gives the value of the property. The exact definition of <code>value</code> is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p>
  1045. </td></tr>
  1046. </table>
  1047. <h4>return</h4>
  1048. <p>FreeType error code. 0&nbsp;means success.</p>
  1049. <h4>note</h4>
  1050. <p>If <code>module_name</code> isn't a valid module name, or <code>property_name</code> doesn't specify a valid property, or if <code>value</code> doesn't represent a valid value for the given property, an error is returned.</p>
  1051. <p>The following example gets property &lsquo;baz&rsquo; (a range) in module &lsquo;foo&rsquo;.
  1052. <div class="highlight"><pre><span></span><code> typedef range_
  1053. {
  1054. FT_Int32 min;
  1055. FT_Int32 max;
  1056. } range;
  1057. range baz;
  1058. FT_Property_Get( library, &quot;foo&quot;, &quot;baz&quot;, &amp;baz );
  1059. </code></pre></div></p>
  1060. <p>It is not possible to retrieve properties of the FreeType Cache sub-system with FT_Property_Get; use ?FTC_Property_Get? instead.</p>
  1061. <h4>since</h4>
  1062. <p>2.4.11</p>
  1063. <hr>
  1064. <h2 id="ft_set_default_properties">FT_Set_Default_Properties<a class="headerlink" href="#ft_set_default_properties" title="Permanent link">&para;</a></h2>
  1065. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1066. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  1067. <b>FT_Set_Default_Properties</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library );
  1068. </code></pre></div>
  1069. <p>If compilation option <code>FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES</code> is set, this function reads the <code>FREETYPE_PROPERTIES</code> environment variable to control driver properties. See section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; for more.</p>
  1070. <p>If the compilation option is not set, this function does nothing.</p>
  1071. <p><code>FREETYPE_PROPERTIES</code> has the following syntax form (broken here into multiple lines for better readability).
  1072. <div class="highlight"><pre><span></span><code> &lt;optional whitespace&gt;
  1073. &lt;module-name1&gt; &#39;:&#39;
  1074. &lt;property-name1&gt; &#39;=&#39; &lt;property-value1&gt;
  1075. &lt;whitespace&gt;
  1076. &lt;module-name2&gt; &#39;:&#39;
  1077. &lt;property-name2&gt; &#39;=&#39; &lt;property-value2&gt;
  1078. ...
  1079. </code></pre></div></p>
  1080. <p>Example:
  1081. <div class="highlight"><pre><span></span><code> FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
  1082. cff:no-stem-darkening=0
  1083. </code></pre></div></p>
  1084. <h4>inout</h4>
  1085. <table class="fields">
  1086. <tr><td class="val" id="library">library</td><td class="desc">
  1087. <p>A handle to a new library object.</p>
  1088. </td></tr>
  1089. </table>
  1090. <h4>since</h4>
  1091. <p>2.8</p>
  1092. <hr>
  1093. <h2 id="ft_new_library">FT_New_Library<a class="headerlink" href="#ft_new_library" title="Permanent link">&para;</a></h2>
  1094. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1095. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1096. <b>FT_New_Library</b>( <a href="ft2-system_interface.html#ft_memory">FT_Memory</a> memory,
  1097. <a href="ft2-base_interface.html#ft_library">FT_Library</a> *alibrary );
  1098. </code></pre></div>
  1099. <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. Note, however, that the used <code><a href="ft2-system_interface.html#ft_memory">FT_Memory</a></code> structure is expected to remain valid for the life of the <code><a href="ft2-base_interface.html#ft_library">FT_Library</a></code> object.</p>
  1100. <p>Normally, you would call this function (followed by a call to <code><a href="ft2-module_management.html#ft_add_default_modules">FT_Add_Default_Modules</a></code> or a series of calls to <code><a href="ft2-module_management.html#ft_add_module">FT_Add_Module</a></code>, and a call to <code><a href="ft2-module_management.html#ft_set_default_properties">FT_Set_Default_Properties</a></code>) instead of <code><a href="ft2-base_interface.html#ft_init_freetype">FT_Init_FreeType</a></code> to initialize the FreeType library.</p>
  1101. <p>Don't use <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code> but <code><a href="ft2-module_management.html#ft_done_library">FT_Done_Library</a></code> to destroy a library instance.</p>
  1102. <h4>input</h4>
  1103. <table class="fields">
  1104. <tr><td class="val" id="memory">memory</td><td class="desc">
  1105. <p>A handle to the original memory object.</p>
  1106. </td></tr>
  1107. </table>
  1108. <h4>output</h4>
  1109. <table class="fields">
  1110. <tr><td class="val" id="alibrary">alibrary</td><td class="desc">
  1111. <p>A pointer to handle of a new library object.</p>
  1112. </td></tr>
  1113. </table>
  1114. <h4>return</h4>
  1115. <p>FreeType error code. 0&nbsp;means success.</p>
  1116. <h4>note</h4>
  1117. <p>See the discussion of reference counters in the description of <code><a href="ft2-module_management.html#ft_reference_library">FT_Reference_Library</a></code>.</p>
  1118. <hr>
  1119. <h2 id="ft_done_library">FT_Done_Library<a class="headerlink" href="#ft_done_library" title="Permanent link">&para;</a></h2>
  1120. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1121. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1122. <b>FT_Done_Library</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library );
  1123. </code></pre></div>
  1124. <p>Discard a given library object. This closes all drivers and discards all resource objects.</p>
  1125. <h4>input</h4>
  1126. <table class="fields">
  1127. <tr><td class="val" id="library">library</td><td class="desc">
  1128. <p>A handle to the target library.</p>
  1129. </td></tr>
  1130. </table>
  1131. <h4>return</h4>
  1132. <p>FreeType error code. 0&nbsp;means success.</p>
  1133. <h4>note</h4>
  1134. <p>See the discussion of reference counters in the description of <code><a href="ft2-module_management.html#ft_reference_library">FT_Reference_Library</a></code>.</p>
  1135. <hr>
  1136. <h2 id="ft_reference_library">FT_Reference_Library<a class="headerlink" href="#ft_reference_library" title="Permanent link">&para;</a></h2>
  1137. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1138. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1139. <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library );
  1140. </code></pre></div>
  1141. <p>A counter gets initialized to&nbsp;1 at the time an <code><a href="ft2-base_interface.html#ft_library">FT_Library</a></code> structure is created. This function increments the counter. <code><a href="ft2-module_management.html#ft_done_library">FT_Done_Library</a></code> then only destroys a library if the counter is&nbsp;1, otherwise it simply decrements the counter.</p>
  1142. <p>This function helps in managing life-cycles of structures that reference <code><a href="ft2-base_interface.html#ft_library">FT_Library</a></code> objects.</p>
  1143. <h4>input</h4>
  1144. <table class="fields">
  1145. <tr><td class="val" id="library">library</td><td class="desc">
  1146. <p>A handle to a target library object.</p>
  1147. </td></tr>
  1148. </table>
  1149. <h4>return</h4>
  1150. <p>FreeType error code. 0&nbsp;means success.</p>
  1151. <h4>since</h4>
  1152. <p>2.4.2</p>
  1153. <hr>
  1154. <h2 id="ft_renderer">FT_Renderer<a class="headerlink" href="#ft_renderer" title="Permanent link">&para;</a></h2>
  1155. <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
  1156. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_* <b>FT_Renderer</b>;
  1157. </code></pre></div>
  1158. <p>A handle to a given FreeType renderer. A renderer is a module in charge of converting a glyph's outline image to a bitmap. It supports a single glyph image format, and one or more target surface depths.</p>
  1159. <hr>
  1160. <h2 id="ft_renderer_class">FT_Renderer_Class<a class="headerlink" href="#ft_renderer_class" title="Permanent link">&para;</a></h2>
  1161. <p>Defined in FT_RENDER_H (freetype/ftrender.h).</p>
  1162. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Renderer_Class_
  1163. {
  1164. <a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a> root;
  1165. <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> glyph_format;
  1166. FT_Renderer_RenderFunc render_glyph;
  1167. FT_Renderer_TransformFunc transform_glyph;
  1168. FT_Renderer_GetCBoxFunc get_glyph_cbox;
  1169. FT_Renderer_SetModeFunc set_mode;
  1170. <a href="ft2-raster.html#ft_raster_funcs">FT_Raster_Funcs</a>* raster_class;
  1171. } <b>FT_Renderer_Class</b>;
  1172. </code></pre></div>
  1173. <p>The renderer module class descriptor.</p>
  1174. <h4>fields</h4>
  1175. <table class="fields">
  1176. <tr><td class="val" id="root">root</td><td class="desc">
  1177. <p>The root <code><a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a></code> fields.</p>
  1178. </td></tr>
  1179. <tr><td class="val" id="glyph_format">glyph_format</td><td class="desc">
  1180. <p>The glyph image format this renderer handles.</p>
  1181. </td></tr>
  1182. <tr><td class="val" id="render_glyph">render_glyph</td><td class="desc">
  1183. <p>A method used to render the image that is in a given glyph slot into a bitmap.</p>
  1184. </td></tr>
  1185. <tr><td class="val" id="transform_glyph">transform_glyph</td><td class="desc">
  1186. <p>A method used to transform the image that is in a given glyph slot.</p>
  1187. </td></tr>
  1188. <tr><td class="val" id="get_glyph_cbox">get_glyph_cbox</td><td class="desc">
  1189. <p>A method used to access the glyph's cbox.</p>
  1190. </td></tr>
  1191. <tr><td class="val" id="set_mode">set_mode</td><td class="desc">
  1192. <p>A method used to pass additional parameters.</p>
  1193. </td></tr>
  1194. <tr><td class="val" id="raster_class">raster_class</td><td class="desc">
  1195. <p>For <code><a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_OUTLINE</a></code> renderers only. This is a pointer to its raster's class.</p>
  1196. </td></tr>
  1197. </table>
  1198. <hr>
  1199. <h2 id="ft_get_renderer">FT_Get_Renderer<a class="headerlink" href="#ft_get_renderer" title="Permanent link">&para;</a></h2>
  1200. <p>Defined in FT_RENDER_H (freetype/ftrender.h).</p>
  1201. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-module_management.html#ft_renderer">FT_Renderer</a> )
  1202. <b>FT_Get_Renderer</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  1203. <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> format );
  1204. </code></pre></div>
  1205. <p>Retrieve the current renderer for a given glyph format.</p>
  1206. <h4>input</h4>
  1207. <table class="fields">
  1208. <tr><td class="val" id="library">library</td><td class="desc">
  1209. <p>A handle to the library object.</p>
  1210. </td></tr>
  1211. <tr><td class="val" id="format">format</td><td class="desc">
  1212. <p>The glyph format.</p>
  1213. </td></tr>
  1214. </table>
  1215. <h4>return</h4>
  1216. <p>A renderer handle. 0&nbsp;if none found.</p>
  1217. <h4>note</h4>
  1218. <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>
  1219. <p>To add a new renderer, simply use <code><a href="ft2-module_management.html#ft_add_module">FT_Add_Module</a></code>. To retrieve a renderer by its name, use <code><a href="ft2-module_management.html#ft_get_module">FT_Get_Module</a></code>.</p>
  1220. <hr>
  1221. <h2 id="ft_set_renderer">FT_Set_Renderer<a class="headerlink" href="#ft_set_renderer" title="Permanent link">&para;</a></h2>
  1222. <p>Defined in FT_RENDER_H (freetype/ftrender.h).</p>
  1223. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1224. <b>FT_Set_Renderer</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  1225. <a href="ft2-module_management.html#ft_renderer">FT_Renderer</a> renderer,
  1226. <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_params,
  1227. <a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a>* parameters );
  1228. </code></pre></div>
  1229. <p>Set the current renderer to use, and set additional mode.</p>
  1230. <h4>inout</h4>
  1231. <table class="fields">
  1232. <tr><td class="val" id="library">library</td><td class="desc">
  1233. <p>A handle to the library object.</p>
  1234. </td></tr>
  1235. </table>
  1236. <h4>input</h4>
  1237. <table class="fields">
  1238. <tr><td class="val" id="renderer">renderer</td><td class="desc">
  1239. <p>A handle to the renderer object.</p>
  1240. </td></tr>
  1241. <tr><td class="val" id="num_params">num_params</td><td class="desc">
  1242. <p>The number of additional parameters.</p>
  1243. </td></tr>
  1244. <tr><td class="val" id="parameters">parameters</td><td class="desc">
  1245. <p>Additional parameters.</p>
  1246. </td></tr>
  1247. </table>
  1248. <h4>return</h4>
  1249. <p>FreeType error code. 0&nbsp;means success.</p>
  1250. <h4>note</h4>
  1251. <p>In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.</p>
  1252. <p>This doesn't change the current renderer for other formats.</p>
  1253. <p>Currently, no FreeType renderer module uses <code>parameters</code>; you should thus always pass <code>NULL</code> as the value.</p>
  1254. <hr>
  1255. <h2 id="ft_set_debug_hook">FT_Set_Debug_Hook<a class="headerlink" href="#ft_set_debug_hook" title="Permanent link">&para;</a></h2>
  1256. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1257. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  1258. <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  1259. <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> hook_index,
  1260. <a href="ft2-module_management.html#ft_debughook_func">FT_DebugHook_Func</a> debug_hook );
  1261. </code></pre></div>
  1262. <p>Set a debug hook function for debugging the interpreter of a font format.</p>
  1263. <p>While this is a public API function, an application needs access to FreeType's internal header files to do something useful.</p>
  1264. <p>Have a look at the source code of the <code>ttdebug</code> FreeType demo program for an example of its usage.</p>
  1265. <h4>inout</h4>
  1266. <table class="fields">
  1267. <tr><td class="val" id="library">library</td><td class="desc">
  1268. <p>A handle to the library object.</p>
  1269. </td></tr>
  1270. </table>
  1271. <h4>input</h4>
  1272. <table class="fields">
  1273. <tr><td class="val" id="hook_index">hook_index</td><td class="desc">
  1274. <p>The index of the debug hook. You should use defined enumeration macros like <code><a href="ft2-module_management.html#ft_debug_hook_xxx">FT_DEBUG_HOOK_TRUETYPE</a></code>.</p>
  1275. </td></tr>
  1276. <tr><td class="val" id="debug_hook">debug_hook</td><td class="desc">
  1277. <p>The function used to debug the interpreter.</p>
  1278. </td></tr>
  1279. </table>
  1280. <h4>note</h4>
  1281. <p>Currently, four debug hook slots are available, but only one (for the TrueType interpreter) is defined.</p>
  1282. <hr>
  1283. <h2 id="ft_driver">FT_Driver<a class="headerlink" href="#ft_driver" title="Permanent link">&para;</a></h2>
  1284. <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
  1285. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_* <b>FT_Driver</b>;
  1286. </code></pre></div>
  1287. <p>A handle to a given FreeType font driver object. A font driver is a module capable of creating faces from font files.</p>
  1288. <hr>
  1289. <h2 id="ft_debughook_func">FT_DebugHook_Func<a class="headerlink" href="#ft_debughook_func" title="Permanent link">&para;</a></h2>
  1290. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1291. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a>
  1292. (*<b>FT_DebugHook_Func</b>)( <span class="keyword">void</span>* arg );
  1293. </code></pre></div>
  1294. <p>A drop-in replacement (or rather a wrapper) for the bytecode or charstring interpreter's main loop function.</p>
  1295. <p>Its job is essentially</p>
  1296. <ul>
  1297. <li>
  1298. <p>to activate debug mode to enforce single-stepping,</p>
  1299. </li>
  1300. <li>
  1301. <p>to call the main loop function to interpret the next opcode, and</p>
  1302. </li>
  1303. <li>
  1304. <p>to show the changed context to the user.</p>
  1305. </li>
  1306. </ul>
  1307. <p>An example for such a main loop function is <code>TT_RunIns</code> (declared in FreeType's internal header file <code>src/truetype/ttinterp.h</code>).</p>
  1308. <p>Have a look at the source code of the <code>ttdebug</code> FreeType demo program for an example of a drop-in replacement.</p>
  1309. <h4>inout</h4>
  1310. <table class="fields">
  1311. <tr><td class="val" id="arg">arg</td><td class="desc">
  1312. <p>A typeless pointer, to be cast to the main loop function's data structure (which depends on the font module). For TrueType fonts it is bytecode interpreter's execution context, <code>TT_ExecContext</code>, which is declared in FreeType's internal header file <code>tttypes.h</code>.</p>
  1313. </td></tr>
  1314. </table>
  1315. <hr>
  1316. <h2 id="ft_debug_hook_xxx">FT_DEBUG_HOOK_XXX<a class="headerlink" href="#ft_debug_hook_xxx" title="Permanent link">&para;</a></h2>
  1317. <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
  1318. <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-module_management.html#ft_debug_hook_truetype">FT_DEBUG_HOOK_TRUETYPE</a> 0
  1319. </code></pre></div>
  1320. <p>A list of named debug hook indices.</p>
  1321. <h4>values</h4>
  1322. <table class="fields">
  1323. <tr><td class="val" id="ft_debug_hook_truetype">FT_DEBUG_HOOK_TRUETYPE</td><td class="desc">
  1324. <p>This hook index identifies the TrueType bytecode debugger.</p>
  1325. </td></tr>
  1326. </table>
  1327. <hr>
  1328. </article>
  1329. </div>
  1330. </div>
  1331. </main>
  1332. <footer class="md-footer">
  1333. <nav class="md-footer__inner md-grid" aria-label="Footer">
  1334. <a href="ft2-system_interface.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: System Interface" rel="prev">
  1335. <div class="md-footer__button md-icon">
  1336. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  1337. </div>
  1338. <div class="md-footer__title">
  1339. <div class="md-ellipsis">
  1340. <span class="md-footer__direction">
  1341. Previous
  1342. </span>
  1343. System Interface
  1344. </div>
  1345. </div>
  1346. </a>
  1347. <a href="ft2-gzip.html" class="md-footer__link md-footer__link--next" aria-label="Next: GZIP Streams" rel="next">
  1348. <div class="md-footer__title">
  1349. <div class="md-ellipsis">
  1350. <span class="md-footer__direction">
  1351. Next
  1352. </span>
  1353. GZIP Streams
  1354. </div>
  1355. </div>
  1356. <div class="md-footer__button md-icon">
  1357. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
  1358. </div>
  1359. </a>
  1360. </nav>
  1361. <div class="md-footer-meta md-typeset">
  1362. <div class="md-footer-meta__inner md-grid">
  1363. <div class="md-footer-copyright">
  1364. <div class="md-footer-copyright__highlight">
  1365. Copyright 2021 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
  1366. </div>
  1367. Made with
  1368. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  1369. Material for MkDocs
  1370. </a>
  1371. </div>
  1372. </div>
  1373. </div>
  1374. </footer>
  1375. </div>
  1376. <div class="md-dialog" data-md-component="dialog">
  1377. <div class="md-dialog__inner md-typeset"></div>
  1378. </div>
  1379. <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script>
  1380. <script src="assets/javascripts/bundle.82b56eb2.min.js"></script>
  1381. <script src="javascripts/extra.js"></script>
  1382. </body>
  1383. </html>