🛠️🐜 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.

2290 lines
74 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>Outline Processing - 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="#outline-processing" 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. Outline Processing
  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 md-nav__item--active">
  365. <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
  366. <label class="md-nav__link md-nav__link--active" for="__toc">
  367. Outline Processing
  368. <span class="md-nav__icon md-icon"></span>
  369. </label>
  370. <a href="ft2-outline_processing.html" class="md-nav__link md-nav__link--active">
  371. Outline Processing
  372. </a>
  373. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  374. <label class="md-nav__title" for="__toc">
  375. <span class="md-nav__icon md-icon"></span>
  376. Table of contents
  377. </label>
  378. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  379. <li class="md-nav__item">
  380. <a href="#synopsis" class="md-nav__link">
  381. Synopsis
  382. </a>
  383. </li>
  384. <li class="md-nav__item">
  385. <a href="#ft_outline" class="md-nav__link">
  386. FT_Outline
  387. </a>
  388. </li>
  389. <li class="md-nav__item">
  390. <a href="#ft_outline_new" class="md-nav__link">
  391. FT_Outline_New
  392. </a>
  393. </li>
  394. <li class="md-nav__item">
  395. <a href="#ft_outline_done" class="md-nav__link">
  396. FT_Outline_Done
  397. </a>
  398. </li>
  399. <li class="md-nav__item">
  400. <a href="#ft_outline_copy" class="md-nav__link">
  401. FT_Outline_Copy
  402. </a>
  403. </li>
  404. <li class="md-nav__item">
  405. <a href="#ft_outline_translate" class="md-nav__link">
  406. FT_Outline_Translate
  407. </a>
  408. </li>
  409. <li class="md-nav__item">
  410. <a href="#ft_outline_transform" class="md-nav__link">
  411. FT_Outline_Transform
  412. </a>
  413. </li>
  414. <li class="md-nav__item">
  415. <a href="#ft_outline_embolden" class="md-nav__link">
  416. FT_Outline_Embolden
  417. </a>
  418. </li>
  419. <li class="md-nav__item">
  420. <a href="#ft_outline_emboldenxy" class="md-nav__link">
  421. FT_Outline_EmboldenXY
  422. </a>
  423. </li>
  424. <li class="md-nav__item">
  425. <a href="#ft_outline_reverse" class="md-nav__link">
  426. FT_Outline_Reverse
  427. </a>
  428. </li>
  429. <li class="md-nav__item">
  430. <a href="#ft_outline_check" class="md-nav__link">
  431. FT_Outline_Check
  432. </a>
  433. </li>
  434. <li class="md-nav__item">
  435. <a href="#ft_outline_get_cbox" class="md-nav__link">
  436. FT_Outline_Get_CBox
  437. </a>
  438. </li>
  439. <li class="md-nav__item">
  440. <a href="#ft_outline_get_bbox" class="md-nav__link">
  441. FT_Outline_Get_BBox
  442. </a>
  443. </li>
  444. <li class="md-nav__item">
  445. <a href="#ft_outline_get_bitmap" class="md-nav__link">
  446. FT_Outline_Get_Bitmap
  447. </a>
  448. </li>
  449. <li class="md-nav__item">
  450. <a href="#ft_outline_render" class="md-nav__link">
  451. FT_Outline_Render
  452. </a>
  453. </li>
  454. <li class="md-nav__item">
  455. <a href="#ft_outline_decompose" class="md-nav__link">
  456. FT_Outline_Decompose
  457. </a>
  458. </li>
  459. <li class="md-nav__item">
  460. <a href="#ft_outline_funcs" class="md-nav__link">
  461. FT_Outline_Funcs
  462. </a>
  463. </li>
  464. <li class="md-nav__item">
  465. <a href="#ft_outline_movetofunc" class="md-nav__link">
  466. FT_Outline_MoveToFunc
  467. </a>
  468. </li>
  469. <li class="md-nav__item">
  470. <a href="#ft_outline_linetofunc" class="md-nav__link">
  471. FT_Outline_LineToFunc
  472. </a>
  473. </li>
  474. <li class="md-nav__item">
  475. <a href="#ft_outline_conictofunc" class="md-nav__link">
  476. FT_Outline_ConicToFunc
  477. </a>
  478. </li>
  479. <li class="md-nav__item">
  480. <a href="#ft_outline_cubictofunc" class="md-nav__link">
  481. FT_Outline_CubicToFunc
  482. </a>
  483. </li>
  484. <li class="md-nav__item">
  485. <a href="#ft_orientation" class="md-nav__link">
  486. FT_Orientation
  487. </a>
  488. </li>
  489. <li class="md-nav__item">
  490. <a href="#ft_outline_get_orientation" class="md-nav__link">
  491. FT_Outline_Get_Orientation
  492. </a>
  493. </li>
  494. <li class="md-nav__item">
  495. <a href="#ft_outline_xxx" class="md-nav__link">
  496. FT_OUTLINE_XXX
  497. </a>
  498. </li>
  499. </ul>
  500. </nav>
  501. </li>
  502. <li class="md-nav__item">
  503. <a href="ft2-quick_advance.html" class="md-nav__link">
  504. Quick retrieval of advance values
  505. </a>
  506. </li>
  507. <li class="md-nav__item">
  508. <a href="ft2-bitmap_handling.html" class="md-nav__link">
  509. Bitmap Handling
  510. </a>
  511. </li>
  512. <li class="md-nav__item">
  513. <a href="ft2-raster.html" class="md-nav__link">
  514. Scanline Converter
  515. </a>
  516. </li>
  517. <li class="md-nav__item">
  518. <a href="ft2-glyph_stroker.html" class="md-nav__link">
  519. Glyph Stroker
  520. </a>
  521. </li>
  522. <li class="md-nav__item">
  523. <a href="ft2-system_interface.html" class="md-nav__link">
  524. System Interface
  525. </a>
  526. </li>
  527. <li class="md-nav__item">
  528. <a href="ft2-module_management.html" class="md-nav__link">
  529. Module Management
  530. </a>
  531. </li>
  532. <li class="md-nav__item">
  533. <a href="ft2-gzip.html" class="md-nav__link">
  534. GZIP Streams
  535. </a>
  536. </li>
  537. <li class="md-nav__item">
  538. <a href="ft2-lzw.html" class="md-nav__link">
  539. LZW Streams
  540. </a>
  541. </li>
  542. <li class="md-nav__item">
  543. <a href="ft2-bzip2.html" class="md-nav__link">
  544. BZIP2 Streams
  545. </a>
  546. </li>
  547. <li class="md-nav__item">
  548. <a href="ft2-debugging_apis.html" class="md-nav__link">
  549. External Debugging APIs
  550. </a>
  551. </li>
  552. </ul>
  553. </nav>
  554. </li>
  555. <li class="md-nav__item md-nav__item--nested">
  556. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
  557. <label class="md-nav__link" for="__nav_9">
  558. Error Codes
  559. <span class="md-nav__icon md-icon"></span>
  560. </label>
  561. <nav class="md-nav" aria-label="Error Codes" data-md-level="1">
  562. <label class="md-nav__title" for="__nav_9">
  563. <span class="md-nav__icon md-icon"></span>
  564. Error Codes
  565. </label>
  566. <ul class="md-nav__list" data-md-scrollfix>
  567. <li class="md-nav__item">
  568. <a href="ft2-error_enumerations.html" class="md-nav__link">
  569. Error Enumerations
  570. </a>
  571. </li>
  572. <li class="md-nav__item">
  573. <a href="ft2-error_code_values.html" class="md-nav__link">
  574. Error Code Values
  575. </a>
  576. </li>
  577. </ul>
  578. </nav>
  579. </li>
  580. <li class="md-nav__item md-nav__item--nested">
  581. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
  582. <label class="md-nav__link" for="__nav_10">
  583. Miscellaneous
  584. <span class="md-nav__icon md-icon"></span>
  585. </label>
  586. <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1">
  587. <label class="md-nav__title" for="__nav_10">
  588. <span class="md-nav__icon md-icon"></span>
  589. Miscellaneous
  590. </label>
  591. <ul class="md-nav__list" data-md-scrollfix>
  592. <li class="md-nav__item">
  593. <a href="ft2-gx_validation.html" class="md-nav__link">
  594. TrueTypeGX/AAT Validation
  595. </a>
  596. </li>
  597. <li class="md-nav__item">
  598. <a href="ft2-incremental.html" class="md-nav__link">
  599. Incremental Loading
  600. </a>
  601. </li>
  602. <li class="md-nav__item">
  603. <a href="ft2-truetype_engine.html" class="md-nav__link">
  604. The TrueType Engine
  605. </a>
  606. </li>
  607. <li class="md-nav__item">
  608. <a href="ft2-ot_validation.html" class="md-nav__link">
  609. OpenType Validation
  610. </a>
  611. </li>
  612. </ul>
  613. </nav>
  614. </li>
  615. </ul>
  616. </nav>
  617. </div>
  618. </div>
  619. </div>
  620. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  621. <div class="md-sidebar__scrollwrap">
  622. <div class="md-sidebar__inner">
  623. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  624. <label class="md-nav__title" for="__toc">
  625. <span class="md-nav__icon md-icon"></span>
  626. Table of contents
  627. </label>
  628. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  629. <li class="md-nav__item">
  630. <a href="#synopsis" class="md-nav__link">
  631. Synopsis
  632. </a>
  633. </li>
  634. <li class="md-nav__item">
  635. <a href="#ft_outline" class="md-nav__link">
  636. FT_Outline
  637. </a>
  638. </li>
  639. <li class="md-nav__item">
  640. <a href="#ft_outline_new" class="md-nav__link">
  641. FT_Outline_New
  642. </a>
  643. </li>
  644. <li class="md-nav__item">
  645. <a href="#ft_outline_done" class="md-nav__link">
  646. FT_Outline_Done
  647. </a>
  648. </li>
  649. <li class="md-nav__item">
  650. <a href="#ft_outline_copy" class="md-nav__link">
  651. FT_Outline_Copy
  652. </a>
  653. </li>
  654. <li class="md-nav__item">
  655. <a href="#ft_outline_translate" class="md-nav__link">
  656. FT_Outline_Translate
  657. </a>
  658. </li>
  659. <li class="md-nav__item">
  660. <a href="#ft_outline_transform" class="md-nav__link">
  661. FT_Outline_Transform
  662. </a>
  663. </li>
  664. <li class="md-nav__item">
  665. <a href="#ft_outline_embolden" class="md-nav__link">
  666. FT_Outline_Embolden
  667. </a>
  668. </li>
  669. <li class="md-nav__item">
  670. <a href="#ft_outline_emboldenxy" class="md-nav__link">
  671. FT_Outline_EmboldenXY
  672. </a>
  673. </li>
  674. <li class="md-nav__item">
  675. <a href="#ft_outline_reverse" class="md-nav__link">
  676. FT_Outline_Reverse
  677. </a>
  678. </li>
  679. <li class="md-nav__item">
  680. <a href="#ft_outline_check" class="md-nav__link">
  681. FT_Outline_Check
  682. </a>
  683. </li>
  684. <li class="md-nav__item">
  685. <a href="#ft_outline_get_cbox" class="md-nav__link">
  686. FT_Outline_Get_CBox
  687. </a>
  688. </li>
  689. <li class="md-nav__item">
  690. <a href="#ft_outline_get_bbox" class="md-nav__link">
  691. FT_Outline_Get_BBox
  692. </a>
  693. </li>
  694. <li class="md-nav__item">
  695. <a href="#ft_outline_get_bitmap" class="md-nav__link">
  696. FT_Outline_Get_Bitmap
  697. </a>
  698. </li>
  699. <li class="md-nav__item">
  700. <a href="#ft_outline_render" class="md-nav__link">
  701. FT_Outline_Render
  702. </a>
  703. </li>
  704. <li class="md-nav__item">
  705. <a href="#ft_outline_decompose" class="md-nav__link">
  706. FT_Outline_Decompose
  707. </a>
  708. </li>
  709. <li class="md-nav__item">
  710. <a href="#ft_outline_funcs" class="md-nav__link">
  711. FT_Outline_Funcs
  712. </a>
  713. </li>
  714. <li class="md-nav__item">
  715. <a href="#ft_outline_movetofunc" class="md-nav__link">
  716. FT_Outline_MoveToFunc
  717. </a>
  718. </li>
  719. <li class="md-nav__item">
  720. <a href="#ft_outline_linetofunc" class="md-nav__link">
  721. FT_Outline_LineToFunc
  722. </a>
  723. </li>
  724. <li class="md-nav__item">
  725. <a href="#ft_outline_conictofunc" class="md-nav__link">
  726. FT_Outline_ConicToFunc
  727. </a>
  728. </li>
  729. <li class="md-nav__item">
  730. <a href="#ft_outline_cubictofunc" class="md-nav__link">
  731. FT_Outline_CubicToFunc
  732. </a>
  733. </li>
  734. <li class="md-nav__item">
  735. <a href="#ft_orientation" class="md-nav__link">
  736. FT_Orientation
  737. </a>
  738. </li>
  739. <li class="md-nav__item">
  740. <a href="#ft_outline_get_orientation" class="md-nav__link">
  741. FT_Outline_Get_Orientation
  742. </a>
  743. </li>
  744. <li class="md-nav__item">
  745. <a href="#ft_outline_xxx" class="md-nav__link">
  746. FT_OUTLINE_XXX
  747. </a>
  748. </li>
  749. </ul>
  750. </nav>
  751. </div>
  752. </div>
  753. </div>
  754. <div class="md-content" data-md-component="content">
  755. <article class="md-content__inner md-typeset">
  756. <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; Outline Processing</p>
  757. <hr />
  758. <h1 id="outline-processing">Outline Processing<a class="headerlink" href="#outline-processing" title="Permanent link">&para;</a></h1>
  759. <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
  760. <p>This section contains routines used to create and destroy scalable glyph images known as &lsquo;outlines&rsquo;. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>
  761. <h2 id="ft_outline">FT_Outline<a class="headerlink" href="#ft_outline" title="Permanent link">&para;</a></h2>
  762. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  763. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_
  764. {
  765. <span class="keyword">short</span> n_contours; /* number of contours in glyph */
  766. <span class="keyword">short</span> n_points; /* number of points in the glyph */
  767. <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* points; /* the outline's points */
  768. <span class="keyword">char</span>* tags; /* the points flags */
  769. <span class="keyword">short</span>* contours; /* the contour end points */
  770. <span class="keyword">int</span> flags; /* outline masks */
  771. } <b>FT_Outline</b>;
  772. </code></pre></div>
  773. <p>This structure is used to describe an outline to the scan-line converter.</p>
  774. <h4>fields</h4>
  775. <table class="fields">
  776. <tr><td class="val" id="n_contours">n_contours</td><td class="desc">
  777. <p>The number of contours in the outline.</p>
  778. </td></tr>
  779. <tr><td class="val" id="n_points">n_points</td><td class="desc">
  780. <p>The number of points in the outline.</p>
  781. </td></tr>
  782. <tr><td class="val" id="points">points</td><td class="desc">
  783. <p>A pointer to an array of <code>n_points</code> <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> elements, giving the outline's point coordinates.</p>
  784. </td></tr>
  785. <tr><td class="val" id="tags">tags</td><td class="desc">
  786. <p>A pointer to an array of <code>n_points</code> chars, giving each outline point's type.</p>
  787. <p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bezier control point, while it is &lsquo;on&rsquo; if set.</p>
  788. <p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bezier arc control point; and a second-order control point if unset.</p>
  789. <p>If bit&nbsp;2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the &lsquo;SCANMODE&rsquo; instruction).</p>
  790. <p>Bits 3 and&nbsp;4 are reserved for internal purposes.</p>
  791. </td></tr>
  792. <tr><td class="val" id="contours">contours</td><td class="desc">
  793. <p>An array of <code>n_contours</code> shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points &lsquo;0&rsquo; to <code>contours[0]</code>, the second one is defined by the points <code>contours[0]+1</code> to <code>contours[1]</code>, etc.</p>
  794. </td></tr>
  795. <tr><td class="val" id="flags">flags</td><td class="desc">
  796. <p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_XXX</a></code>.</p>
  797. </td></tr>
  798. </table>
  799. <h4>note</h4>
  800. <p>The B/W rasterizer only checks bit&nbsp;2 in the <code>tags</code> array for the first point of each contour. The drop-out mode as given with <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code>, <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a></code>, and <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a></code> in <code>flags</code> is then overridden.</p>
  801. <hr>
  802. <h2 id="ft_outline_new">FT_Outline_New<a class="headerlink" href="#ft_outline_new" title="Permanent link">&para;</a></h2>
  803. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  804. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  805. <b>FT_Outline_New</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  806. <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> numPoints,
  807. <a href="ft2-basic_types.html#ft_int">FT_Int</a> numContours,
  808. <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> *anoutline );
  809. </code></pre></div>
  810. <p>Create a new outline of a given size.</p>
  811. <h4>input</h4>
  812. <table class="fields">
  813. <tr><td class="val" id="library">library</td><td class="desc">
  814. <p>A handle to the library object from where the outline is allocated. Note however that the new outline will <strong>not</strong> necessarily be <strong>freed</strong>, when destroying the library, by <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code>.</p>
  815. </td></tr>
  816. <tr><td class="val" id="numpoints">numPoints</td><td class="desc">
  817. <p>The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).</p>
  818. </td></tr>
  819. <tr><td class="val" id="numcontours">numContours</td><td class="desc">
  820. <p>The maximum number of contours within the outline. This value must be in the range 0 to <code>numPoints</code>.</p>
  821. </td></tr>
  822. </table>
  823. <h4>output</h4>
  824. <table class="fields">
  825. <tr><td class="val" id="anoutline">anoutline</td><td class="desc">
  826. <p>A handle to the new outline.</p>
  827. </td></tr>
  828. </table>
  829. <h4>return</h4>
  830. <p>FreeType error code. 0&nbsp;means success.</p>
  831. <h4>note</h4>
  832. <p>The reason why this function takes a <code>library</code> parameter is simply to use the library's memory allocator.</p>
  833. <hr>
  834. <h2 id="ft_outline_done">FT_Outline_Done<a class="headerlink" href="#ft_outline_done" title="Permanent link">&para;</a></h2>
  835. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  836. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  837. <b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  838. <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
  839. </code></pre></div>
  840. <p>Destroy an outline created with <code><a href="ft2-outline_processing.html#ft_outline_new">FT_Outline_New</a></code>.</p>
  841. <h4>input</h4>
  842. <table class="fields">
  843. <tr><td class="val" id="library">library</td><td class="desc">
  844. <p>A handle of the library object used to allocate the outline.</p>
  845. </td></tr>
  846. <tr><td class="val" id="outline">outline</td><td class="desc">
  847. <p>A pointer to the outline object to be discarded.</p>
  848. </td></tr>
  849. </table>
  850. <h4>return</h4>
  851. <p>FreeType error code. 0&nbsp;means success.</p>
  852. <h4>note</h4>
  853. <p>If the outline's &lsquo;owner&rsquo; field is not set, only the outline descriptor will be released.</p>
  854. <hr>
  855. <h2 id="ft_outline_copy">FT_Outline_Copy<a class="headerlink" href="#ft_outline_copy" title="Permanent link">&para;</a></h2>
  856. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  857. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  858. <b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* source,
  859. <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> *target );
  860. </code></pre></div>
  861. <p>Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of contours) when this function is called.</p>
  862. <h4>input</h4>
  863. <table class="fields">
  864. <tr><td class="val" id="source">source</td><td class="desc">
  865. <p>A handle to the source outline.</p>
  866. </td></tr>
  867. </table>
  868. <h4>output</h4>
  869. <table class="fields">
  870. <tr><td class="val" id="target">target</td><td class="desc">
  871. <p>A handle to the target outline.</p>
  872. </td></tr>
  873. </table>
  874. <h4>return</h4>
  875. <p>FreeType error code. 0&nbsp;means success.</p>
  876. <hr>
  877. <h2 id="ft_outline_translate">FT_Outline_Translate<a class="headerlink" href="#ft_outline_translate" title="Permanent link">&para;</a></h2>
  878. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  879. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  880. <b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  881. <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xOffset,
  882. <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> yOffset );
  883. </code></pre></div>
  884. <p>Apply a simple translation to the points of an outline.</p>
  885. <h4>inout</h4>
  886. <table class="fields">
  887. <tr><td class="val" id="outline">outline</td><td class="desc">
  888. <p>A pointer to the target outline descriptor.</p>
  889. </td></tr>
  890. </table>
  891. <h4>input</h4>
  892. <table class="fields">
  893. <tr><td class="val" id="xoffset">xOffset</td><td class="desc">
  894. <p>The horizontal offset.</p>
  895. </td></tr>
  896. <tr><td class="val" id="yoffset">yOffset</td><td class="desc">
  897. <p>The vertical offset.</p>
  898. </td></tr>
  899. </table>
  900. <hr>
  901. <h2 id="ft_outline_transform">FT_Outline_Transform<a class="headerlink" href="#ft_outline_transform" title="Permanent link">&para;</a></h2>
  902. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  903. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  904. <b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  905. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* matrix );
  906. </code></pre></div>
  907. <p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p>
  908. <h4>inout</h4>
  909. <table class="fields">
  910. <tr><td class="val" id="outline">outline</td><td class="desc">
  911. <p>A pointer to the target outline descriptor.</p>
  912. </td></tr>
  913. </table>
  914. <h4>input</h4>
  915. <table class="fields">
  916. <tr><td class="val" id="matrix">matrix</td><td class="desc">
  917. <p>A pointer to the transformation matrix.</p>
  918. </td></tr>
  919. </table>
  920. <h4>note</h4>
  921. <p>You can use <code><a href="ft2-outline_processing.html#ft_outline_translate">FT_Outline_Translate</a></code> if you need to translate the outline's points.</p>
  922. <hr>
  923. <h2 id="ft_outline_embolden">FT_Outline_Embolden<a class="headerlink" href="#ft_outline_embolden" title="Permanent link">&para;</a></h2>
  924. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  925. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  926. <b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  927. <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> strength );
  928. </code></pre></div>
  929. <p>Embolden an outline. The new outline will be at most 4&nbsp;times <code>strength</code> pixels wider and higher. You may think of the left and bottom borders as unchanged.</p>
  930. <p>Negative <code>strength</code> values to reduce the outline thickness are possible also.</p>
  931. <h4>inout</h4>
  932. <table class="fields">
  933. <tr><td class="val" id="outline">outline</td><td class="desc">
  934. <p>A handle to the target outline.</p>
  935. </td></tr>
  936. </table>
  937. <h4>input</h4>
  938. <table class="fields">
  939. <tr><td class="val" id="strength">strength</td><td class="desc">
  940. <p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p>
  941. </td></tr>
  942. </table>
  943. <h4>return</h4>
  944. <p>FreeType error code. 0&nbsp;means success.</p>
  945. <h4>note</h4>
  946. <p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p>
  947. <p>If you need &lsquo;better&rsquo; metrics values you should call <code><a href="ft2-outline_processing.html#ft_outline_get_cbox">FT_Outline_Get_CBox</a></code> or <code><a href="ft2-outline_processing.html#ft_outline_get_bbox">FT_Outline_Get_BBox</a></code>.</p>
  948. <p>To get meaningful results, font scaling values must be set with functions like <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code> before calling FT_Render_Glyph.</p>
  949. <h4>example</h4>
  950. <div class="highlight"><pre><span></span><code> FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
  951. if ( face-&gt;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
  952. FT_Outline_Embolden( &amp;face-&gt;glyph-&gt;outline, strength );
  953. </code></pre></div>
  954. <hr>
  955. <h2 id="ft_outline_emboldenxy">FT_Outline_EmboldenXY<a class="headerlink" href="#ft_outline_emboldenxy" title="Permanent link">&para;</a></h2>
  956. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  957. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  958. <b>FT_Outline_EmboldenXY</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  959. <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xstrength,
  960. <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> ystrength );
  961. </code></pre></div>
  962. <p>Embolden an outline. The new outline will be <code>xstrength</code> pixels wider and <code>ystrength</code> pixels higher. Otherwise, it is similar to <code><a href="ft2-outline_processing.html#ft_outline_embolden">FT_Outline_Embolden</a></code>, which uses the same strength in both directions.</p>
  963. <h4>since</h4>
  964. <p>2.4.10</p>
  965. <hr>
  966. <h2 id="ft_outline_reverse">FT_Outline_Reverse<a class="headerlink" href="#ft_outline_reverse" title="Permanent link">&para;</a></h2>
  967. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  968. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  969. <b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
  970. </code></pre></div>
  971. <p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p>
  972. <h4>inout</h4>
  973. <table class="fields">
  974. <tr><td class="val" id="outline">outline</td><td class="desc">
  975. <p>A pointer to the target outline descriptor.</p>
  976. </td></tr>
  977. </table>
  978. <h4>note</h4>
  979. <p>This function toggles the bit flag <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_REVERSE_FILL</a></code> in the outline's <code>flags</code> field.</p>
  980. <p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p>
  981. <hr>
  982. <h2 id="ft_outline_check">FT_Outline_Check<a class="headerlink" href="#ft_outline_check" title="Permanent link">&para;</a></h2>
  983. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  984. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  985. <b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
  986. </code></pre></div>
  987. <p>Check the contents of an outline descriptor.</p>
  988. <h4>input</h4>
  989. <table class="fields">
  990. <tr><td class="val" id="outline">outline</td><td class="desc">
  991. <p>A handle to a source outline.</p>
  992. </td></tr>
  993. </table>
  994. <h4>return</h4>
  995. <p>FreeType error code. 0&nbsp;means success.</p>
  996. <h4>note</h4>
  997. <p>An empty outline, or an outline with a single point only is also valid.</p>
  998. <hr>
  999. <h2 id="ft_outline_get_cbox">FT_Outline_Get_CBox<a class="headerlink" href="#ft_outline_get_cbox" title="Permanent link">&para;</a></h2>
  1000. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  1001. <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
  1002. <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  1003. <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *acbox );
  1004. </code></pre></div>
  1005. <p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
  1006. <p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>
  1007. <h4>input</h4>
  1008. <table class="fields">
  1009. <tr><td class="val" id="outline">outline</td><td class="desc">
  1010. <p>A pointer to the source outline descriptor.</p>
  1011. </td></tr>
  1012. </table>
  1013. <h4>output</h4>
  1014. <table class="fields">
  1015. <tr><td class="val" id="acbox">acbox</td><td class="desc">
  1016. <p>The outline's control box.</p>
  1017. </td></tr>
  1018. </table>
  1019. <h4>note</h4>
  1020. <p>See <code><a href="ft2-glyph_management.html#ft_glyph_get_cbox">FT_Glyph_Get_CBox</a></code> for a discussion of tricky fonts.</p>
  1021. <hr>
  1022. <h2 id="ft_outline_get_bbox">FT_Outline_Get_BBox<a class="headerlink" href="#ft_outline_get_bbox" title="Permanent link">&para;</a></h2>
  1023. <p>Defined in FT_BBOX_H (freetype/ftbbox.h).</p>
  1024. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1025. <b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  1026. <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *abbox );
  1027. </code></pre></div>
  1028. <p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <em>very</em> quickly when the two boxes coincide. Otherwise, the outline Bezier arcs are traversed to extract their extrema.</p>
  1029. <h4>input</h4>
  1030. <table class="fields">
  1031. <tr><td class="val" id="outline">outline</td><td class="desc">
  1032. <p>A pointer to the source outline.</p>
  1033. </td></tr>
  1034. </table>
  1035. <h4>output</h4>
  1036. <table class="fields">
  1037. <tr><td class="val" id="abbox">abbox</td><td class="desc">
  1038. <p>The outline's exact bounding box.</p>
  1039. </td></tr>
  1040. </table>
  1041. <h4>return</h4>
  1042. <p>FreeType error code. 0&nbsp;means success.</p>
  1043. <h4>note</h4>
  1044. <p>If the font is tricky and the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, the resulting BBox is meaningless. To get reasonable values for the BBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the BBox, which can be eventually converted back to font units.</p>
  1045. <hr>
  1046. <h2 id="ft_outline_get_bitmap">FT_Outline_Get_Bitmap<a class="headerlink" href="#ft_outline_get_bitmap" title="Permanent link">&para;</a></h2>
  1047. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  1048. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1049. <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  1050. <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  1051. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *abitmap );
  1052. </code></pre></div>
  1053. <p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>
  1054. <h4>input</h4>
  1055. <table class="fields">
  1056. <tr><td class="val" id="library">library</td><td class="desc">
  1057. <p>A handle to a FreeType library object.</p>
  1058. </td></tr>
  1059. <tr><td class="val" id="outline">outline</td><td class="desc">
  1060. <p>A pointer to the source outline descriptor.</p>
  1061. </td></tr>
  1062. </table>
  1063. <h4>inout</h4>
  1064. <table class="fields">
  1065. <tr><td class="val" id="abitmap">abitmap</td><td class="desc">
  1066. <p>A pointer to the target bitmap descriptor.</p>
  1067. </td></tr>
  1068. </table>
  1069. <h4>return</h4>
  1070. <p>FreeType error code. 0&nbsp;means success.</p>
  1071. <h4>note</h4>
  1072. <p>This function does <strong>not create</strong> the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in <code>abitmap</code> should be set accordingly.</p>
  1073. <p>It will use the raster corresponding to the default glyph format.</p>
  1074. <p>The value of the <code>num_grays</code> field in <code>abitmap</code> is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <code><a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a></code> directly.</p>
  1075. <hr>
  1076. <h2 id="ft_outline_render">FT_Outline_Render<a class="headerlink" href="#ft_outline_render" title="Permanent link">&para;</a></h2>
  1077. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  1078. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1079. <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
  1080. <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  1081. <a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a>* params );
  1082. </code></pre></div>
  1083. <p>Render an outline within a bitmap using the current scan-convert.</p>
  1084. <h4>input</h4>
  1085. <table class="fields">
  1086. <tr><td class="val" id="library">library</td><td class="desc">
  1087. <p>A handle to a FreeType library object.</p>
  1088. </td></tr>
  1089. <tr><td class="val" id="outline">outline</td><td class="desc">
  1090. <p>A pointer to the source outline descriptor.</p>
  1091. </td></tr>
  1092. </table>
  1093. <h4>inout</h4>
  1094. <table class="fields">
  1095. <tr><td class="val" id="params">params</td><td class="desc">
  1096. <p>A pointer to an <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> structure used to describe the rendering operation.</p>
  1097. </td></tr>
  1098. </table>
  1099. <h4>return</h4>
  1100. <p>FreeType error code. 0&nbsp;means success.</p>
  1101. <h4>note</h4>
  1102. <p>This advanced function uses <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> as an argument. The field <code>params.source</code> will be set to <code>outline</code> before the scan converter is called, which means that the value you give to it is actually ignored. Either <code>params.target</code> must point to preallocated bitmap, or <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DIRECT</a></code> must be set in <code>params.flags</code> allowing FreeType rasterizer to be used for direct composition, translucency, etc. See <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> for more details.</p>
  1103. <hr>
  1104. <h2 id="ft_outline_decompose">FT_Outline_Decompose<a class="headerlink" href="#ft_outline_decompose" title="Permanent link">&para;</a></h2>
  1105. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  1106. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
  1107. <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
  1108. <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline_funcs">FT_Outline_Funcs</a>* func_interface,
  1109. <span class="keyword">void</span>* user );
  1110. </code></pre></div>
  1111. <p>Walk over an outline's structure to decompose it into individual segments and Bezier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>
  1112. <h4>input</h4>
  1113. <table class="fields">
  1114. <tr><td class="val" id="outline">outline</td><td class="desc">
  1115. <p>A pointer to the source target.</p>
  1116. </td></tr>
  1117. <tr><td class="val" id="func_interface">func_interface</td><td class="desc">
  1118. <p>A table of &lsquo;emitters&rsquo;, i.e., function pointers called during decomposition to indicate path operations.</p>
  1119. </td></tr>
  1120. </table>
  1121. <h4>inout</h4>
  1122. <table class="fields">
  1123. <tr><td class="val" id="user">user</td><td class="desc">
  1124. <p>A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
  1125. </td></tr>
  1126. </table>
  1127. <h4>return</h4>
  1128. <p>FreeType error code. 0&nbsp;means success.</p>
  1129. <h4>note</h4>
  1130. <p>A contour that contains a single point only is represented by a &lsquo;move to&rsquo; operation followed by &lsquo;line to&rsquo; to the same point. In most cases, it is best to filter this out before using the outline for stroking purposes (otherwise it would result in a visible dot when round caps are used).</p>
  1131. <p>Similarly, the function returns success for an empty outline also (doing nothing, this is, not calling any emitter); if necessary, you should filter this out, too.</p>
  1132. <hr>
  1133. <h2 id="ft_outline_funcs">FT_Outline_Funcs<a class="headerlink" href="#ft_outline_funcs" title="Permanent link">&para;</a></h2>
  1134. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  1135. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_Funcs_
  1136. {
  1137. <a href="ft2-outline_processing.html#ft_outline_movetofunc">FT_Outline_MoveToFunc</a> move_to;
  1138. <a href="ft2-outline_processing.html#ft_outline_linetofunc">FT_Outline_LineToFunc</a> line_to;
  1139. <a href="ft2-outline_processing.html#ft_outline_conictofunc">FT_Outline_ConicToFunc</a> conic_to;
  1140. <a href="ft2-outline_processing.html#ft_outline_cubictofunc">FT_Outline_CubicToFunc</a> cubic_to;
  1141. <span class="keyword">int</span> shift;
  1142. <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> delta;
  1143. } <b>FT_Outline_Funcs</b>;
  1144. </code></pre></div>
  1145. <p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers.</p>
  1146. <h4>fields</h4>
  1147. <table class="fields">
  1148. <tr><td class="val" id="move_to">move_to</td><td class="desc">
  1149. <p>The &lsquo;move to&rsquo; emitter.</p>
  1150. </td></tr>
  1151. <tr><td class="val" id="line_to">line_to</td><td class="desc">
  1152. <p>The segment emitter.</p>
  1153. </td></tr>
  1154. <tr><td class="val" id="conic_to">conic_to</td><td class="desc">
  1155. <p>The second-order Bezier arc emitter.</p>
  1156. </td></tr>
  1157. <tr><td class="val" id="cubic_to">cubic_to</td><td class="desc">
  1158. <p>The third-order Bezier arc emitter.</p>
  1159. </td></tr>
  1160. <tr><td class="val" id="shift">shift</td><td class="desc">
  1161. <p>The shift that is applied to coordinates before they are sent to the emitter.</p>
  1162. </td></tr>
  1163. <tr><td class="val" id="delta">delta</td><td class="desc">
  1164. <p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
  1165. </td></tr>
  1166. </table>
  1167. <h4>note</h4>
  1168. <p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:
  1169. <div class="highlight"><pre><span></span><code> x&#39; = (x &lt;&lt; shift) - delta
  1170. y&#39; = (y &lt;&lt; shift) - delta
  1171. </code></pre></div></p>
  1172. <p>Set the values of <code>shift</code> and <code>delta</code> to&nbsp;0 to get the original point coordinates.</p>
  1173. <hr>
  1174. <h2 id="ft_outline_movetofunc">FT_Outline_MoveToFunc<a class="headerlink" href="#ft_outline_movetofunc" title="Permanent link">&para;</a></h2>
  1175. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  1176. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
  1177. (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
  1178. <span class="keyword">void</span>* user );
  1179. #<span class="keyword">define</span> FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b>
  1180. </code></pre></div>
  1181. <p>A function pointer type used to describe the signature of a &lsquo;move to&rsquo; function during outline walking/decomposition.</p>
  1182. <p>A &lsquo;move to&rsquo; is emitted to start a new contour in an outline.</p>
  1183. <h4>input</h4>
  1184. <table class="fields">
  1185. <tr><td class="val" id="to">to</td><td class="desc">
  1186. <p>A pointer to the target point of the &lsquo;move to&rsquo;.</p>
  1187. </td></tr>
  1188. <tr><td class="val" id="user">user</td><td class="desc">
  1189. <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
  1190. </td></tr>
  1191. </table>
  1192. <h4>return</h4>
  1193. <p>Error code. 0&nbsp;means success.</p>
  1194. <hr>
  1195. <h2 id="ft_outline_linetofunc">FT_Outline_LineToFunc<a class="headerlink" href="#ft_outline_linetofunc" title="Permanent link">&para;</a></h2>
  1196. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  1197. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
  1198. (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
  1199. <span class="keyword">void</span>* user );
  1200. #<span class="keyword">define</span> FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b>
  1201. </code></pre></div>
  1202. <p>A function pointer type used to describe the signature of a &lsquo;line to&rsquo; function during outline walking/decomposition.</p>
  1203. <p>A &lsquo;line to&rsquo; is emitted to indicate a segment in the outline.</p>
  1204. <h4>input</h4>
  1205. <table class="fields">
  1206. <tr><td class="val" id="to">to</td><td class="desc">
  1207. <p>A pointer to the target point of the &lsquo;line to&rsquo;.</p>
  1208. </td></tr>
  1209. <tr><td class="val" id="user">user</td><td class="desc">
  1210. <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
  1211. </td></tr>
  1212. </table>
  1213. <h4>return</h4>
  1214. <p>Error code. 0&nbsp;means success.</p>
  1215. <hr>
  1216. <h2 id="ft_outline_conictofunc">FT_Outline_ConicToFunc<a class="headerlink" href="#ft_outline_conictofunc" title="Permanent link">&para;</a></h2>
  1217. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  1218. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
  1219. (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control,
  1220. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
  1221. <span class="keyword">void</span>* user );
  1222. #<span class="keyword">define</span> FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b>
  1223. </code></pre></div>
  1224. <p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p>
  1225. <p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bezier arc in the outline.</p>
  1226. <h4>input</h4>
  1227. <table class="fields">
  1228. <tr><td class="val" id="control">control</td><td class="desc">
  1229. <p>An intermediate control point between the last position and the new target in <code>to</code>.</p>
  1230. </td></tr>
  1231. <tr><td class="val" id="to">to</td><td class="desc">
  1232. <p>A pointer to the target end point of the conic arc.</p>
  1233. </td></tr>
  1234. <tr><td class="val" id="user">user</td><td class="desc">
  1235. <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
  1236. </td></tr>
  1237. </table>
  1238. <h4>return</h4>
  1239. <p>Error code. 0&nbsp;means success.</p>
  1240. <hr>
  1241. <h2 id="ft_outline_cubictofunc">FT_Outline_CubicToFunc<a class="headerlink" href="#ft_outline_cubictofunc" title="Permanent link">&para;</a></h2>
  1242. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  1243. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
  1244. (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control1,
  1245. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control2,
  1246. <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
  1247. <span class="keyword">void</span>* user );
  1248. #<span class="keyword">define</span> FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b>
  1249. </code></pre></div>
  1250. <p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p>
  1251. <p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bezier arc.</p>
  1252. <h4>input</h4>
  1253. <table class="fields">
  1254. <tr><td class="val" id="control1">control1</td><td class="desc">
  1255. <p>A pointer to the first Bezier control point.</p>
  1256. </td></tr>
  1257. <tr><td class="val" id="control2">control2</td><td class="desc">
  1258. <p>A pointer to the second Bezier control point.</p>
  1259. </td></tr>
  1260. <tr><td class="val" id="to">to</td><td class="desc">
  1261. <p>A pointer to the target end point.</p>
  1262. </td></tr>
  1263. <tr><td class="val" id="user">user</td><td class="desc">
  1264. <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
  1265. </td></tr>
  1266. </table>
  1267. <h4>return</h4>
  1268. <p>Error code. 0&nbsp;means success.</p>
  1269. <hr>
  1270. <h2 id="ft_orientation">FT_Orientation<a class="headerlink" href="#ft_orientation" title="Permanent link">&para;</a></h2>
  1271. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  1272. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Orientation_
  1273. {
  1274. <a href="ft2-outline_processing.html#ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</a> = 0,
  1275. <a href="ft2-outline_processing.html#ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</a> = 1,
  1276. <a href="ft2-outline_processing.html#ft_orientation_fill_right">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</a>,
  1277. <a href="ft2-outline_processing.html#ft_orientation_fill_left">FT_ORIENTATION_FILL_LEFT</a> = <a href="ft2-outline_processing.html#ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</a>,
  1278. <a href="ft2-outline_processing.html#ft_orientation_none">FT_ORIENTATION_NONE</a>
  1279. } <b>FT_Orientation</b>;
  1280. </code></pre></div>
  1281. <p>A list of values used to describe an outline's contour orientation.</p>
  1282. <p>The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p>
  1283. <h4>values</h4>
  1284. <table class="fields">
  1285. <tr><td class="val" id="ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</td><td class="desc">
  1286. <p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p>
  1287. </td></tr>
  1288. <tr><td class="val" id="ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</td><td class="desc">
  1289. <p>According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p>
  1290. </td></tr>
  1291. <tr><td class="val" id="ft_orientation_fill_right">FT_ORIENTATION_FILL_RIGHT</td><td class="desc">
  1292. <p>This is identical to <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p>
  1293. </td></tr>
  1294. <tr><td class="val" id="ft_orientation_fill_left">FT_ORIENTATION_FILL_LEFT</td><td class="desc">
  1295. <p>This is identical to <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a></code>, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.</p>
  1296. </td></tr>
  1297. <tr><td class="val" id="ft_orientation_none">FT_ORIENTATION_NONE</td><td class="desc">
  1298. <p>The orientation cannot be determined. That is, different parts of the glyph have different orientation.</p>
  1299. </td></tr>
  1300. </table>
  1301. <hr>
  1302. <h2 id="ft_outline_get_orientation">FT_Outline_Get_Orientation<a class="headerlink" href="#ft_outline_get_orientation" title="Permanent link">&para;</a></h2>
  1303. <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
  1304. <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a> )
  1305. <b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
  1306. </code></pre></div>
  1307. <p>This function analyzes a glyph outline and tries to compute its fill orientation (see <code><a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a></code>). This is done by integrating the total area covered by the outline. The positive integral corresponds to the clockwise orientation and <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a></code> is returned. The negative integral corresponds to the counter-clockwise orientation and <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code> is returned.</p>
  1308. <p>Note that this will return <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code> for empty outlines.</p>
  1309. <h4>input</h4>
  1310. <table class="fields">
  1311. <tr><td class="val" id="outline">outline</td><td class="desc">
  1312. <p>A handle to the source outline.</p>
  1313. </td></tr>
  1314. </table>
  1315. <h4>return</h4>
  1316. <p>The orientation.</p>
  1317. <hr>
  1318. <h2 id="ft_outline_xxx">FT_OUTLINE_XXX<a class="headerlink" href="#ft_outline_xxx" title="Permanent link">&para;</a></h2>
  1319. <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
  1320. <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_none">FT_OUTLINE_NONE</a> 0x0
  1321. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_owner">FT_OUTLINE_OWNER</a> 0x1
  1322. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2
  1323. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</a> 0x4
  1324. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8
  1325. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_smart_dropouts">FT_OUTLINE_SMART_DROPOUTS</a> 0x10
  1326. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_include_stubs">FT_OUTLINE_INCLUDE_STUBS</a> 0x20
  1327. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_overlap">FT_OUTLINE_OVERLAP</a> 0x40
  1328. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</a> 0x100
  1329. #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</a> 0x200
  1330. /* these constants are deprecated; use the corresponding */
  1331. /* `<b>FT_OUTLINE_XXX</b>` values instead */
  1332. #<span class="keyword">define</span> ft_outline_none <a href="ft2-outline_processing.html#ft_outline_none">FT_OUTLINE_NONE</a>
  1333. #<span class="keyword">define</span> ft_outline_owner <a href="ft2-outline_processing.html#ft_outline_owner">FT_OUTLINE_OWNER</a>
  1334. #<span class="keyword">define</span> ft_outline_even_odd_fill <a href="ft2-outline_processing.html#ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</a>
  1335. #<span class="keyword">define</span> ft_outline_reverse_fill <a href="ft2-outline_processing.html#ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</a>
  1336. #<span class="keyword">define</span> ft_outline_ignore_dropouts <a href="ft2-outline_processing.html#ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</a>
  1337. #<span class="keyword">define</span> ft_outline_high_precision <a href="ft2-outline_processing.html#ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</a>
  1338. #<span class="keyword">define</span> ft_outline_single_pass <a href="ft2-outline_processing.html#ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</a>
  1339. </code></pre></div>
  1340. <p>A list of bit-field constants used for the flags in an outline's <code>flags</code> field.</p>
  1341. <h4>values</h4>
  1342. <table class="fields long">
  1343. <tr><td class="val" id="ft_outline_none">FT_OUTLINE_NONE</td><td class="desc">
  1344. <p>Value&nbsp;0 is reserved.</p>
  1345. </td></tr>
  1346. <tr><td class="val" id="ft_outline_owner">FT_OUTLINE_OWNER</td><td class="desc">
  1347. <p>If set, this flag indicates that the outline's field arrays (i.e., <code>points</code>, <code>flags</code>, and <code>contours</code>) are &lsquo;owned&rsquo; by the outline object, and should thus be freed when it is destroyed.</p>
  1348. </td></tr>
  1349. <tr><td class="val" id="ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</td><td class="desc">
  1350. <p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
  1351. </td></tr>
  1352. <tr><td class="val" id="ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</td><td class="desc">
  1353. <p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type&nbsp;1 fonts). This flag is ignored by the scan converter.</p>
  1354. </td></tr>
  1355. <tr><td class="val" id="ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</td><td class="desc">
  1356. <p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
  1357. </td></tr>
  1358. <tr><td class="val" id="ft_outline_smart_dropouts">FT_OUTLINE_SMART_DROPOUTS</td><td class="desc">
  1359. <p>Select smart dropout control. If unset, use simple dropout control. Ignored if <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code> is set. See below for more information.</p>
  1360. </td></tr>
  1361. <tr><td class="val" id="ft_outline_include_stubs">FT_OUTLINE_INCLUDE_STUBS</td><td class="desc">
  1362. <p>If set, turn pixels on for &lsquo;stubs&rsquo;, otherwise exclude them. Ignored if <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code> is set. See below for more information.</p>
  1363. </td></tr>
  1364. <tr><td class="val" id="ft_outline_overlap">FT_OUTLINE_OVERLAP</td><td class="desc">
  1365. <p>This flag indicates that this outline contains overlapping contrours and the anti-aliased renderer should perform oversampling to mitigate possible artifacts. This flag should <em>not</em> be set for well designed glyphs without overlaps because it quadruples the rendering time.</p>
  1366. </td></tr>
  1367. <tr><td class="val" id="ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</td><td class="desc">
  1368. <p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
  1369. </td></tr>
  1370. <tr><td class="val" id="ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</td><td class="desc">
  1371. <p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
  1372. </td></tr>
  1373. </table>
  1374. <h4>note</h4>
  1375. <p>The flags <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code>, <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a></code>, and <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a></code> are ignored by the smooth rasterizer.</p>
  1376. <p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the <code>tags</code> field in <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>.</p>
  1377. <p>Please refer to the description of the &lsquo;SCANTYPE&rsquo; instruction in the OpenType specification (in file <code>ttinst1.doc</code>) how simple drop-outs, smart drop-outs, and stubs are defined.</p>
  1378. <hr>
  1379. </article>
  1380. </div>
  1381. </div>
  1382. </main>
  1383. <footer class="md-footer">
  1384. <nav class="md-footer__inner md-grid" aria-label="Footer">
  1385. <a href="ft2-list_processing.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: List Processing" rel="prev">
  1386. <div class="md-footer__button md-icon">
  1387. <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>
  1388. </div>
  1389. <div class="md-footer__title">
  1390. <div class="md-ellipsis">
  1391. <span class="md-footer__direction">
  1392. Previous
  1393. </span>
  1394. List Processing
  1395. </div>
  1396. </div>
  1397. </a>
  1398. <a href="ft2-quick_advance.html" class="md-footer__link md-footer__link--next" aria-label="Next: Quick retrieval of advance values" rel="next">
  1399. <div class="md-footer__title">
  1400. <div class="md-ellipsis">
  1401. <span class="md-footer__direction">
  1402. Next
  1403. </span>
  1404. Quick retrieval of advance values
  1405. </div>
  1406. </div>
  1407. <div class="md-footer__button md-icon">
  1408. <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>
  1409. </div>
  1410. </a>
  1411. </nav>
  1412. <div class="md-footer-meta md-typeset">
  1413. <div class="md-footer-meta__inner md-grid">
  1414. <div class="md-footer-copyright">
  1415. <div class="md-footer-copyright__highlight">
  1416. Copyright 2021 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
  1417. </div>
  1418. Made with
  1419. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  1420. Material for MkDocs
  1421. </a>
  1422. </div>
  1423. </div>
  1424. </div>
  1425. </footer>
  1426. </div>
  1427. <div class="md-dialog" data-md-component="dialog">
  1428. <div class="md-dialog__inner md-typeset"></div>
  1429. </div>
  1430. <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>
  1431. <script src="assets/javascripts/bundle.82b56eb2.min.js"></script>
  1432. <script src="javascripts/extra.js"></script>
  1433. </body>
  1434. </html>