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

1946 lines
66 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>Driver properties - 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="#driver-properties" 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. Driver properties
  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--active md-nav__item--nested">
  268. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked>
  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 md-nav__item--active">
  305. <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
  306. <label class="md-nav__link md-nav__link--active" for="__toc">
  307. Driver properties
  308. <span class="md-nav__icon md-icon"></span>
  309. </label>
  310. <a href="ft2-properties.html" class="md-nav__link md-nav__link--active">
  311. Driver properties
  312. </a>
  313. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  314. <label class="md-nav__title" for="__toc">
  315. <span class="md-nav__icon md-icon"></span>
  316. Table of contents
  317. </label>
  318. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  319. <li class="md-nav__item">
  320. <a href="#synopsis" class="md-nav__link">
  321. Synopsis
  322. </a>
  323. </li>
  324. <li class="md-nav__item">
  325. <a href="#ft_hinting_xxx" class="md-nav__link">
  326. FT_HINTING_XXX
  327. </a>
  328. </li>
  329. <li class="md-nav__item">
  330. <a href="#hinting-engine" class="md-nav__link">
  331. hinting-engine
  332. </a>
  333. </li>
  334. <li class="md-nav__item">
  335. <a href="#no-stem-darkening" class="md-nav__link">
  336. no-stem-darkening
  337. </a>
  338. </li>
  339. <li class="md-nav__item">
  340. <a href="#darkening-parameters" class="md-nav__link">
  341. darkening-parameters
  342. </a>
  343. </li>
  344. <li class="md-nav__item">
  345. <a href="#random-seed" class="md-nav__link">
  346. random-seed
  347. </a>
  348. </li>
  349. <li class="md-nav__item">
  350. <a href="#no-long-family-names" class="md-nav__link">
  351. no-long-family-names
  352. </a>
  353. </li>
  354. <li class="md-nav__item">
  355. <a href="#tt_interpreter_version_xxx" class="md-nav__link">
  356. TT_INTERPRETER_VERSION_XXX
  357. </a>
  358. </li>
  359. <li class="md-nav__item">
  360. <a href="#interpreter-version" class="md-nav__link">
  361. interpreter-version
  362. </a>
  363. </li>
  364. <li class="md-nav__item">
  365. <a href="#glyph-to-script-map" class="md-nav__link">
  366. glyph-to-script-map
  367. </a>
  368. </li>
  369. <li class="md-nav__item">
  370. <a href="#ft_autohinter_script_xxx" class="md-nav__link">
  371. FT_AUTOHINTER_SCRIPT_XXX
  372. </a>
  373. </li>
  374. <li class="md-nav__item">
  375. <a href="#ft_prop_glyphtoscriptmap" class="md-nav__link">
  376. FT_Prop_GlyphToScriptMap
  377. </a>
  378. </li>
  379. <li class="md-nav__item">
  380. <a href="#fallback-script" class="md-nav__link">
  381. fallback-script
  382. </a>
  383. </li>
  384. <li class="md-nav__item">
  385. <a href="#default-script" class="md-nav__link">
  386. default-script
  387. </a>
  388. </li>
  389. <li class="md-nav__item">
  390. <a href="#increase-x-height" class="md-nav__link">
  391. increase-x-height
  392. </a>
  393. </li>
  394. <li class="md-nav__item">
  395. <a href="#ft_prop_increasexheight" class="md-nav__link">
  396. FT_Prop_IncreaseXHeight
  397. </a>
  398. </li>
  399. <li class="md-nav__item">
  400. <a href="#warping" class="md-nav__link">
  401. warping
  402. </a>
  403. </li>
  404. </ul>
  405. </nav>
  406. </li>
  407. <li class="md-nav__item">
  408. <a href="ft2-parameter_tags.html" class="md-nav__link">
  409. Parameter Tags
  410. </a>
  411. </li>
  412. <li class="md-nav__item">
  413. <a href="ft2-lcd_rendering.html" class="md-nav__link">
  414. Subpixel Rendering
  415. </a>
  416. </li>
  417. </ul>
  418. </nav>
  419. </li>
  420. <li class="md-nav__item md-nav__item--nested">
  421. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" >
  422. <label class="md-nav__link" for="__nav_7">
  423. Cache Sub-System
  424. <span class="md-nav__icon md-icon"></span>
  425. </label>
  426. <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1">
  427. <label class="md-nav__title" for="__nav_7">
  428. <span class="md-nav__icon md-icon"></span>
  429. Cache Sub-System
  430. </label>
  431. <ul class="md-nav__list" data-md-scrollfix>
  432. <li class="md-nav__item">
  433. <a href="ft2-cache_subsystem.html" class="md-nav__link">
  434. Cache Sub-System
  435. </a>
  436. </li>
  437. </ul>
  438. </nav>
  439. </li>
  440. <li class="md-nav__item md-nav__item--nested">
  441. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" >
  442. <label class="md-nav__link" for="__nav_8">
  443. Support API
  444. <span class="md-nav__icon md-icon"></span>
  445. </label>
  446. <nav class="md-nav" aria-label="Support API" data-md-level="1">
  447. <label class="md-nav__title" for="__nav_8">
  448. <span class="md-nav__icon md-icon"></span>
  449. Support API
  450. </label>
  451. <ul class="md-nav__list" data-md-scrollfix>
  452. <li class="md-nav__item">
  453. <a href="ft2-computations.html" class="md-nav__link">
  454. Computations
  455. </a>
  456. </li>
  457. <li class="md-nav__item">
  458. <a href="ft2-list_processing.html" class="md-nav__link">
  459. List Processing
  460. </a>
  461. </li>
  462. <li class="md-nav__item">
  463. <a href="ft2-outline_processing.html" class="md-nav__link">
  464. Outline Processing
  465. </a>
  466. </li>
  467. <li class="md-nav__item">
  468. <a href="ft2-quick_advance.html" class="md-nav__link">
  469. Quick retrieval of advance values
  470. </a>
  471. </li>
  472. <li class="md-nav__item">
  473. <a href="ft2-bitmap_handling.html" class="md-nav__link">
  474. Bitmap Handling
  475. </a>
  476. </li>
  477. <li class="md-nav__item">
  478. <a href="ft2-raster.html" class="md-nav__link">
  479. Scanline Converter
  480. </a>
  481. </li>
  482. <li class="md-nav__item">
  483. <a href="ft2-glyph_stroker.html" class="md-nav__link">
  484. Glyph Stroker
  485. </a>
  486. </li>
  487. <li class="md-nav__item">
  488. <a href="ft2-system_interface.html" class="md-nav__link">
  489. System Interface
  490. </a>
  491. </li>
  492. <li class="md-nav__item">
  493. <a href="ft2-module_management.html" class="md-nav__link">
  494. Module Management
  495. </a>
  496. </li>
  497. <li class="md-nav__item">
  498. <a href="ft2-gzip.html" class="md-nav__link">
  499. GZIP Streams
  500. </a>
  501. </li>
  502. <li class="md-nav__item">
  503. <a href="ft2-lzw.html" class="md-nav__link">
  504. LZW Streams
  505. </a>
  506. </li>
  507. <li class="md-nav__item">
  508. <a href="ft2-bzip2.html" class="md-nav__link">
  509. BZIP2 Streams
  510. </a>
  511. </li>
  512. <li class="md-nav__item">
  513. <a href="ft2-debugging_apis.html" class="md-nav__link">
  514. External Debugging APIs
  515. </a>
  516. </li>
  517. </ul>
  518. </nav>
  519. </li>
  520. <li class="md-nav__item md-nav__item--nested">
  521. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
  522. <label class="md-nav__link" for="__nav_9">
  523. Error Codes
  524. <span class="md-nav__icon md-icon"></span>
  525. </label>
  526. <nav class="md-nav" aria-label="Error Codes" data-md-level="1">
  527. <label class="md-nav__title" for="__nav_9">
  528. <span class="md-nav__icon md-icon"></span>
  529. Error Codes
  530. </label>
  531. <ul class="md-nav__list" data-md-scrollfix>
  532. <li class="md-nav__item">
  533. <a href="ft2-error_enumerations.html" class="md-nav__link">
  534. Error Enumerations
  535. </a>
  536. </li>
  537. <li class="md-nav__item">
  538. <a href="ft2-error_code_values.html" class="md-nav__link">
  539. Error Code Values
  540. </a>
  541. </li>
  542. </ul>
  543. </nav>
  544. </li>
  545. <li class="md-nav__item md-nav__item--nested">
  546. <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
  547. <label class="md-nav__link" for="__nav_10">
  548. Miscellaneous
  549. <span class="md-nav__icon md-icon"></span>
  550. </label>
  551. <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1">
  552. <label class="md-nav__title" for="__nav_10">
  553. <span class="md-nav__icon md-icon"></span>
  554. Miscellaneous
  555. </label>
  556. <ul class="md-nav__list" data-md-scrollfix>
  557. <li class="md-nav__item">
  558. <a href="ft2-gx_validation.html" class="md-nav__link">
  559. TrueTypeGX/AAT Validation
  560. </a>
  561. </li>
  562. <li class="md-nav__item">
  563. <a href="ft2-incremental.html" class="md-nav__link">
  564. Incremental Loading
  565. </a>
  566. </li>
  567. <li class="md-nav__item">
  568. <a href="ft2-truetype_engine.html" class="md-nav__link">
  569. The TrueType Engine
  570. </a>
  571. </li>
  572. <li class="md-nav__item">
  573. <a href="ft2-ot_validation.html" class="md-nav__link">
  574. OpenType Validation
  575. </a>
  576. </li>
  577. </ul>
  578. </nav>
  579. </li>
  580. </ul>
  581. </nav>
  582. </div>
  583. </div>
  584. </div>
  585. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  586. <div class="md-sidebar__scrollwrap">
  587. <div class="md-sidebar__inner">
  588. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  589. <label class="md-nav__title" for="__toc">
  590. <span class="md-nav__icon md-icon"></span>
  591. Table of contents
  592. </label>
  593. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  594. <li class="md-nav__item">
  595. <a href="#synopsis" class="md-nav__link">
  596. Synopsis
  597. </a>
  598. </li>
  599. <li class="md-nav__item">
  600. <a href="#ft_hinting_xxx" class="md-nav__link">
  601. FT_HINTING_XXX
  602. </a>
  603. </li>
  604. <li class="md-nav__item">
  605. <a href="#hinting-engine" class="md-nav__link">
  606. hinting-engine
  607. </a>
  608. </li>
  609. <li class="md-nav__item">
  610. <a href="#no-stem-darkening" class="md-nav__link">
  611. no-stem-darkening
  612. </a>
  613. </li>
  614. <li class="md-nav__item">
  615. <a href="#darkening-parameters" class="md-nav__link">
  616. darkening-parameters
  617. </a>
  618. </li>
  619. <li class="md-nav__item">
  620. <a href="#random-seed" class="md-nav__link">
  621. random-seed
  622. </a>
  623. </li>
  624. <li class="md-nav__item">
  625. <a href="#no-long-family-names" class="md-nav__link">
  626. no-long-family-names
  627. </a>
  628. </li>
  629. <li class="md-nav__item">
  630. <a href="#tt_interpreter_version_xxx" class="md-nav__link">
  631. TT_INTERPRETER_VERSION_XXX
  632. </a>
  633. </li>
  634. <li class="md-nav__item">
  635. <a href="#interpreter-version" class="md-nav__link">
  636. interpreter-version
  637. </a>
  638. </li>
  639. <li class="md-nav__item">
  640. <a href="#glyph-to-script-map" class="md-nav__link">
  641. glyph-to-script-map
  642. </a>
  643. </li>
  644. <li class="md-nav__item">
  645. <a href="#ft_autohinter_script_xxx" class="md-nav__link">
  646. FT_AUTOHINTER_SCRIPT_XXX
  647. </a>
  648. </li>
  649. <li class="md-nav__item">
  650. <a href="#ft_prop_glyphtoscriptmap" class="md-nav__link">
  651. FT_Prop_GlyphToScriptMap
  652. </a>
  653. </li>
  654. <li class="md-nav__item">
  655. <a href="#fallback-script" class="md-nav__link">
  656. fallback-script
  657. </a>
  658. </li>
  659. <li class="md-nav__item">
  660. <a href="#default-script" class="md-nav__link">
  661. default-script
  662. </a>
  663. </li>
  664. <li class="md-nav__item">
  665. <a href="#increase-x-height" class="md-nav__link">
  666. increase-x-height
  667. </a>
  668. </li>
  669. <li class="md-nav__item">
  670. <a href="#ft_prop_increasexheight" class="md-nav__link">
  671. FT_Prop_IncreaseXHeight
  672. </a>
  673. </li>
  674. <li class="md-nav__item">
  675. <a href="#warping" class="md-nav__link">
  676. warping
  677. </a>
  678. </li>
  679. </ul>
  680. </nav>
  681. </div>
  682. </div>
  683. </div>
  684. <div class="md-content" data-md-component="content">
  685. <article class="md-content__inner md-typeset">
  686. <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; Driver properties</p>
  687. <hr />
  688. <h1 id="driver-properties">Driver properties<a class="headerlink" href="#driver-properties" title="Permanent link">&para;</a></h1>
  689. <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
  690. <p>Driver modules can be controlled by setting and unsetting properties, using the functions <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 section documents the available properties, together with auxiliary macros and structures.</p>
  691. <h2 id="ft_hinting_xxx">FT_HINTING_XXX<a class="headerlink" href="#ft_hinting_xxx" title="Permanent link">&para;</a></h2>
  692. <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
  693. <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#ft_hinting_freetype">FT_HINTING_FREETYPE</a> 0
  694. #<span class="keyword">define</span> <a href="ft2-properties.html#ft_hinting_adobe">FT_HINTING_ADOBE</a> 1
  695. /* these constants (introduced in 2.4.12) are deprecated */
  696. #<span class="keyword">define</span> FT_CFF_HINTING_FREETYPE <a href="ft2-properties.html#ft_hinting_freetype">FT_HINTING_FREETYPE</a>
  697. #<span class="keyword">define</span> FT_CFF_HINTING_ADOBE <a href="ft2-properties.html#ft_hinting_adobe">FT_HINTING_ADOBE</a>
  698. </code></pre></div>
  699. <p>A list of constants used for the <code><a href="ft2-properties.html#hinting-engine">hinting-engine</a></code> property to select the hinting engine for CFF, Type&nbsp;1, and CID fonts.</p>
  700. <h4>values</h4>
  701. <table class="fields">
  702. <tr><td class="val" id="ft_hinting_freetype">FT_HINTING_FREETYPE</td><td class="desc">
  703. <p>Use the old FreeType hinting engine.</p>
  704. </td></tr>
  705. <tr><td class="val" id="ft_hinting_adobe">FT_HINTING_ADOBE</td><td class="desc">
  706. <p>Use the hinting engine contributed by Adobe.</p>
  707. </td></tr>
  708. </table>
  709. <h4>since</h4>
  710. <p>2.9</p>
  711. <hr>
  712. <h2 id="hinting-engine">hinting-engine<a class="headerlink" href="#hinting-engine" title="Permanent link">&para;</a></h2>
  713. <p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with <code>CFF_CONFIG_OPTION_OLD_ENGINE</code>. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
  714. <p>The same holds for the Type&nbsp;1 and CID modules if compiled with <code>T1_CONFIG_OPTION_OLD_ENGINE</code>.</p>
  715. <p>For the &lsquo;cff&rsquo; module, the default engine is &lsquo;adobe&rsquo;. For both the &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules, the default engine is &lsquo;adobe&rsquo;, too.</p>
  716. <h4>note</h4>
  717. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  718. <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p>
  719. <h4>example</h4>
  720. <p>The following example code demonstrates how to select Adobe's hinting engine for the &lsquo;cff&rsquo; module (omitting the error handling).
  721. <div class="highlight"><pre><span></span><code> FT_Library library;
  722. FT_UInt hinting_engine = FT_HINTING_ADOBE;
  723. FT_Init_FreeType( &amp;library );
  724. FT_Property_Set( library, &quot;cff&quot;,
  725. &quot;hinting-engine&quot;, &amp;hinting_engine );
  726. </code></pre></div></p>
  727. <h4>since</h4>
  728. <p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
  729. <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
  730. <hr>
  731. <h2 id="no-stem-darkening">no-stem-darkening<a class="headerlink" href="#no-stem-darkening" title="Permanent link">&para;</a></h2>
  732. <p>All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type&nbsp;1, and CID font modules if the &lsquo;Adobe&rsquo; engine is selected (which is the default).</p>
  733. <p>Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p>
  734. <p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; of glyphs, making text remain readable at smaller sizes.</p>
  735. <p>For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (this is, <code>no-stem-darkening</code> is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.</p>
  736. <p>Note that stem darkening is never applied if <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code> is set.</p>
  737. <h4>note</h4>
  738. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  739. <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively). It can also be set per face using <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_stem_darkening">FT_PARAM_TAG_STEM_DARKENING</a></code>.</p>
  740. <h4>example</h4>
  741. <div class="highlight"><pre><span></span><code> FT_Library library;
  742. FT_Bool no_stem_darkening = TRUE;
  743. FT_Init_FreeType( &amp;library );
  744. FT_Property_Set( library, &quot;cff&quot;,
  745. &quot;no-stem-darkening&quot;, &amp;no_stem_darkening );
  746. </code></pre></div>
  747. <h4>since</h4>
  748. <p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
  749. <p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
  750. <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
  751. <hr>
  752. <h2 id="darkening-parameters">darkening-parameters<a class="headerlink" href="#darkening-parameters" title="Permanent link">&para;</a></h2>
  753. <p>By default, the Adobe hinting engine, as used by the CFF, Type&nbsp;1, and CID font drivers, darkens stems as follows (if the <code>no-stem-darkening</code> property isn't set):
  754. <div class="highlight"><pre><span></span><code> stem width &lt;= 0.5px: darkening amount = 0.4px
  755. stem width = 1px: darkening amount = 0.275px
  756. stem width = 1.667px: darkening amount = 0.275px
  757. stem width &gt;= 2.333px: darkening amount = 0px
  758. </code></pre></div></p>
  759. <p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro <code>CFF_CONFIG_OPTION_DARKENING_PARAMETERS</code>; the CFF, Type&nbsp;1, and CID drivers share these values. At runtime, the control points can be changed using the <code>darkening-parameters</code> property (see the example below that demonstrates this for the Type&nbsp;1 driver).</p>
  760. <p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000<sup>th</sup> of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p>
  761. <p>The auto-hinter provides this property, too, as an experimental feature. See <code><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></code> for more.</p>
  762. <h4>note</h4>
  763. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  764. <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable, using eight comma-separated integers without spaces. Here the above example, using <code>\</code> to break the line for readability.
  765. <div class="highlight"><pre><span></span><code> FREETYPE_PROPERTIES=\
  766. type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
  767. </code></pre></div></p>
  768. <h4>example</h4>
  769. <div class="highlight"><pre><span></span><code> FT_Library library;
  770. FT_Int darken_params[8] = { 500, 300, // x1, y1
  771. 1000, 200, // x2, y2
  772. 1500, 100, // x3, y3
  773. 2000, 0 }; // x4, y4
  774. FT_Init_FreeType( &amp;library );
  775. FT_Property_Set( library, &quot;type1&quot;,
  776. &quot;darkening-parameters&quot;, darken_params );
  777. </code></pre></div>
  778. <h4>since</h4>
  779. <p>2.5.1 (for &lsquo;cff&rsquo; module)</p>
  780. <p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
  781. <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
  782. <hr>
  783. <h2 id="random-seed">random-seed<a class="headerlink" href="#random-seed" title="Permanent link">&para;</a></h2>
  784. <p>By default, the seed value for the CFF &lsquo;random&rsquo; operator and the similar &lsquo;0 28 callothersubr pop&rsquo; command for the Type&nbsp;1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by &lsquo;random&rsquo; are repeatable.</p>
  785. <p>The <code>random-seed</code> property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the <code>intitialRandomSeed</code> private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of <code>initialRandomSeed</code>, which is consequently ignored.</p>
  786. <h4>note</h4>
  787. <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable. It can also be set per face using <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_random_seed">FT_PARAM_TAG_RANDOM_SEED</a></code>.</p>
  788. <h4>since</h4>
  789. <p>2.8 (for &lsquo;cff&rsquo; module)</p>
  790. <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
  791. <hr>
  792. <h2 id="no-long-family-names">no-long-family-names<a class="headerlink" href="#no-long-family-names" title="Permanent link">&para;</a></h2>
  793. <p>If <code>PCF_CONFIG_OPTION_LONG_FAMILY_NAMES</code> is active while compiling FreeType, the PCF driver constructs long family names.</p>
  794. <p>There are many PCF fonts just called &lsquo;Fixed&rsquo; which look completely different, and which have nothing to do with each other. When selecting &lsquo;Fixed&rsquo; in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are &lsquo;wide&rsquo; characters; all put together, family names like &lsquo;Sony Fixed&rsquo; or &lsquo;Misc Fixed Wide&rsquo; are constructed.</p>
  795. <p>If <code>no-long-family-names</code> is set, this feature gets switched off.</p>
  796. <h4>note</h4>
  797. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  798. <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
  799. <h4>example</h4>
  800. <div class="highlight"><pre><span></span><code> FT_Library library;
  801. FT_Bool no_long_family_names = TRUE;
  802. FT_Init_FreeType( &amp;library );
  803. FT_Property_Set( library, &quot;pcf&quot;,
  804. &quot;no-long-family-names&quot;,
  805. &amp;no_long_family_names );
  806. </code></pre></div>
  807. <h4>since</h4>
  808. <p>2.8</p>
  809. <hr>
  810. <h2 id="tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_XXX<a class="headerlink" href="#tt_interpreter_version_xxx" title="Permanent link">&para;</a></h2>
  811. <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
  812. <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_35">TT_INTERPRETER_VERSION_35</a> 35
  813. #<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_38">TT_INTERPRETER_VERSION_38</a> 38
  814. #<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_40">TT_INTERPRETER_VERSION_40</a> 40
  815. </code></pre></div>
  816. <p>A list of constants used for the <code><a href="ft2-properties.html#interpreter-version">interpreter-version</a></code> property to select the hinting engine for Truetype fonts.</p>
  817. <p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>
  818. <h4>values</h4>
  819. <table class="fields">
  820. <tr><td class="val" id="tt_interpreter_version_35">TT_INTERPRETER_VERSION_35</td><td class="desc">
  821. <p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p>
  822. </td></tr>
  823. <tr><td class="val" id="tt_interpreter_version_38">TT_INTERPRETER_VERSION_38</td><td class="desc">
  824. <p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7). It is used in FreeType to select the &lsquo;Infinality&rsquo; subpixel hinting code. The code may be removed in a future version.</p>
  825. </td></tr>
  826. <tr><td class="val" id="tt_interpreter_version_40">TT_INTERPRETER_VERSION_40</td><td class="desc">
  827. <p>Version&nbsp;40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows&nbsp;10). It is used in FreeType to select the &lsquo;minimal&rsquo; subpixel hinting code, a stripped-down and higher performance version of the &lsquo;Infinality&rsquo; code.</p>
  828. </td></tr>
  829. </table>
  830. <h4>note</h4>
  831. <p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <strong>not</strong> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
  832. <p>If FreeType has not been compiled with the configuration option <code>TT_CONFIG_OPTION_SUBPIXEL_HINTING</code>, selecting version&nbsp;38 or&nbsp;40 causes an <code>FT_Err_Unimplemented_Feature</code> error.</p>
  833. <p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p>
  834. <p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.
  835. <div class="highlight"><pre><span></span><code> GETINFO framework version feature
  836. -------------------------------------------------------------------
  837. 3 GDI (Win 3.1), v1.0 16-bit, first version
  838. TrueImage
  839. 33 GDI (Win NT 3.1), v1.5 32-bit
  840. HP Laserjet
  841. 34 GDI (Win 95) v1.6 font smoothing,
  842. new SCANTYPE opcode
  843. 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
  844. bits in composite glyphs
  845. 36 MGDI (Win CE 2) v1.6+ classic ClearType
  846. 37 GDI (XP and later), v1.8 ClearType
  847. GDI+ old (before Vista)
  848. 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
  849. WPF Y-direction ClearType,
  850. additional error checking
  851. 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
  852. in GETINFO opcode,
  853. bug fixes
  854. 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
  855. DWrite (Win 8) in GETINFO opcode,
  856. Gray ClearType
  857. </code></pre></div></p>
  858. <p>The &lsquo;version&rsquo; field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.
  859. <div class="highlight"><pre><span></span><code> version sampling rendering comment
  860. x y x y
  861. --------------------------------------------------------------
  862. v1.0 normal normal B/W B/W bi-level
  863. v1.6 high high gray gray grayscale
  864. v1.8 high normal color-filter B/W (GDI) ClearType
  865. v1.9 high high color-filter gray Color ClearType
  866. v2.1 high normal gray B/W Gray ClearType
  867. v2.1 high high gray gray Gray ClearType
  868. </code></pre></div></p>
  869. <p>Color and Gray ClearType are the two available variants of &lsquo;Y-direction ClearType&rsquo;, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is &lsquo;symmetric smoothing&rsquo;. &lsquo;Classic ClearType&rsquo; is the original algorithm used before introducing a modified version in Win&nbsp;XP. Another name for v1.6's grayscale rendering is &lsquo;font smoothing&rsquo;, and &lsquo;Color ClearType&rsquo; is sometimes also called &lsquo;DWrite ClearType&rsquo;. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called &lsquo;GDI ClearType&rsquo;.</p>
  870. <p>&lsquo;Normal&rsquo; and &lsquo;high&rsquo; sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. &lsquo;Normal&rsquo; means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, &lsquo;high&rsquo; means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like &lsquo;MIRP&rsquo;. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.</p>
  871. <p>Note that &lsquo;Gray ClearType&rsquo; is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit&nbsp;12 (hinting for grayscale), while v2.1 returns bits&nbsp;13 (hinting for ClearType), 18 (symmetrical smoothing), and&nbsp;19 (Gray ClearType). Also, this mode respects bits 2 and&nbsp;3 for the version&nbsp;1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version&nbsp;0 (bits 0 and&nbsp;1).</p>
  872. <p>Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.</p>
  873. <hr>
  874. <h2 id="interpreter-version">interpreter-version<a class="headerlink" href="#interpreter-version" title="Permanent link">&para;</a></h2>
  875. <p>Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old &lsquo;Infinality&rsquo; code and new stripped-down and higher performance &lsquo;minimal&rsquo; code) and one without, respectively. The default is subpixel support if <code>TT_CONFIG_OPTION_SUBPIXEL_HINTING</code> is defined, and no subpixel support otherwise (since it isn't available then).</p>
  876. <p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if &lsquo;native ClearType&rsquo; is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.</p>
  877. <p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>&rsquo;. Note that FreeType currently doesn't really &lsquo;subpixel hint&rsquo; (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.</p>
  878. <h4>note</h4>
  879. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  880. <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values &lsquo;35&rsquo;, &lsquo;38&rsquo;, or &lsquo;40&rsquo;).</p>
  881. <h4>example</h4>
  882. <p>The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).
  883. <div class="highlight"><pre><span></span><code> FT_Library library;
  884. FT_Face face;
  885. FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35;
  886. FT_Init_FreeType( &amp;library );
  887. FT_Property_Set( library, &quot;truetype&quot;,
  888. &quot;interpreter-version&quot;,
  889. &amp;interpreter_version );
  890. </code></pre></div></p>
  891. <h4>since</h4>
  892. <p>2.5</p>
  893. <hr>
  894. <h2 id="glyph-to-script-map">glyph-to-script-map<a class="headerlink" href="#glyph-to-script-map" title="Permanent link">&para;</a></h2>
  895. <p><strong>Experimental only</strong></p>
  896. <p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p>
  897. <p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p>
  898. <p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX</a></code> values) is stored as an array with <code>num_glyphs</code> elements, as found in the font's <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> structure. The <code>glyph-to-script-map</code> property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p>
  899. <h4>example</h4>
  900. <p>The following example code demonstrates how to access it (omitting the error handling).
  901. <div class="highlight"><pre><span></span><code> FT_Library library;
  902. FT_Face face;
  903. FT_Prop_GlyphToScriptMap prop;
  904. FT_Init_FreeType( &amp;library );
  905. FT_New_Face( library, &quot;foo.ttf&quot;, 0, &amp;face );
  906. prop.face = face;
  907. FT_Property_Get( library, &quot;autofitter&quot;,
  908. &quot;glyph-to-script-map&quot;, &amp;prop );
  909. // adjust `prop.map&#39; as needed right here
  910. FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
  911. </code></pre></div></p>
  912. <h4>since</h4>
  913. <p>2.4.11</p>
  914. <hr>
  915. <h2 id="ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX<a class="headerlink" href="#ft_autohinter_script_xxx" title="Permanent link">&para;</a></h2>
  916. <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
  917. <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_none">FT_AUTOHINTER_SCRIPT_NONE</a> 0
  918. #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_latin">FT_AUTOHINTER_SCRIPT_LATIN</a> 1
  919. #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_cjk">FT_AUTOHINTER_SCRIPT_CJK</a> 2
  920. #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_indic">FT_AUTOHINTER_SCRIPT_INDIC</a> 3
  921. </code></pre></div>
  922. <p><strong>Experimental only</strong></p>
  923. <p>A list of constants used for the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p>
  924. <h4>values</h4>
  925. <table class="fields long">
  926. <tr><td class="val" id="ft_autohinter_script_none">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc">
  927. <p>Don't auto-hint this glyph.</p>
  928. </td></tr>
  929. <tr><td class="val" id="ft_autohinter_script_latin">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc">
  930. <p>Apply the latin auto-hinter. For the auto-hinter, &lsquo;latin&rsquo; is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p>
  931. <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
  932. <pre><code> U+0020 - U+007F // Basic Latin (no control characters)
  933. U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
  934. U+0100 - U+017F // Latin Extended-A
  935. U+0180 - U+024F // Latin Extended-B
  936. U+0250 - U+02AF // IPA Extensions
  937. U+02B0 - U+02FF // Spacing Modifier Letters
  938. U+0300 - U+036F // Combining Diacritical Marks
  939. U+0370 - U+03FF // Greek and Coptic
  940. U+0400 - U+04FF // Cyrillic
  941. U+0500 - U+052F // Cyrillic Supplement
  942. U+1D00 - U+1D7F // Phonetic Extensions
  943. U+1D80 - U+1DBF // Phonetic Extensions Supplement
  944. U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
  945. U+1E00 - U+1EFF // Latin Extended Additional
  946. U+1F00 - U+1FFF // Greek Extended
  947. U+2000 - U+206F // General Punctuation
  948. U+2070 - U+209F // Superscripts and Subscripts
  949. U+20A0 - U+20CF // Currency Symbols
  950. U+2150 - U+218F // Number Forms
  951. U+2460 - U+24FF // Enclosed Alphanumerics
  952. U+2C60 - U+2C7F // Latin Extended-C
  953. U+2DE0 - U+2DFF // Cyrillic Extended-A
  954. U+2E00 - U+2E7F // Supplemental Punctuation
  955. U+A640 - U+A69F // Cyrillic Extended-B
  956. U+A720 - U+A7FF // Latin Extended-D
  957. U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
  958. U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
  959. U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
  960. </code></pre>
  961. </td></tr>
  962. <tr><td class="val" id="ft_autohinter_script_cjk">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc">
  963. <p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p>
  964. <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
  965. <pre><code> U+1100 - U+11FF // Hangul Jamo
  966. U+2E80 - U+2EFF // CJK Radicals Supplement
  967. U+2F00 - U+2FDF // Kangxi Radicals
  968. U+2FF0 - U+2FFF // Ideographic Description Characters
  969. U+3000 - U+303F // CJK Symbols and Punctuation
  970. U+3040 - U+309F // Hiragana
  971. U+30A0 - U+30FF // Katakana
  972. U+3100 - U+312F // Bopomofo
  973. U+3130 - U+318F // Hangul Compatibility Jamo
  974. U+3190 - U+319F // Kanbun
  975. U+31A0 - U+31BF // Bopomofo Extended
  976. U+31C0 - U+31EF // CJK Strokes
  977. U+31F0 - U+31FF // Katakana Phonetic Extensions
  978. U+3200 - U+32FF // Enclosed CJK Letters and Months
  979. U+3300 - U+33FF // CJK Compatibility
  980. U+3400 - U+4DBF // CJK Unified Ideographs Extension A
  981. U+4DC0 - U+4DFF // Yijing Hexagram Symbols
  982. U+4E00 - U+9FFF // CJK Unified Ideographs
  983. U+A960 - U+A97F // Hangul Jamo Extended-A
  984. U+AC00 - U+D7AF // Hangul Syllables
  985. U+D7B0 - U+D7FF // Hangul Jamo Extended-B
  986. U+F900 - U+FAFF // CJK Compatibility Ideographs
  987. U+FE10 - U+FE1F // Vertical forms
  988. U+FE30 - U+FE4F // CJK Compatibility Forms
  989. U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
  990. U+1B000 - U+1B0FF // Kana Supplement
  991. U+1D300 - U+1D35F // Tai Xuan Hing Symbols
  992. U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
  993. U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
  994. U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
  995. U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
  996. U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
  997. </code></pre>
  998. </td></tr>
  999. <tr><td class="val" id="ft_autohinter_script_indic">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc">
  1000. <p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p>
  1001. <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
  1002. <pre><code> U+0900 - U+0DFF // Indic Range
  1003. U+0F00 - U+0FFF // Tibetan
  1004. U+1900 - U+194F // Limbu
  1005. U+1B80 - U+1BBF // Sundanese
  1006. U+A800 - U+A82F // Syloti Nagri
  1007. U+ABC0 - U+ABFF // Meetei Mayek
  1008. U+11800 - U+118DF // Sharada
  1009. </code></pre>
  1010. <p>Note that currently Indic support is rudimentary only, missing blue zone support.</p>
  1011. </td></tr>
  1012. </table>
  1013. <h4>since</h4>
  1014. <p>2.4.11</p>
  1015. <hr>
  1016. <h2 id="ft_prop_glyphtoscriptmap">FT_Prop_GlyphToScriptMap<a class="headerlink" href="#ft_prop_glyphtoscriptmap" title="Permanent link">&para;</a></h2>
  1017. <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
  1018. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_GlyphToScriptMap_
  1019. {
  1020. <a href="ft2-base_interface.html#ft_face">FT_Face</a> face;
  1021. <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a>* map;
  1022. } <b>FT_Prop_GlyphToScriptMap</b>;
  1023. </code></pre></div>
  1024. <p><strong>Experimental only</strong></p>
  1025. <p>The data exchange structure for the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property.</p>
  1026. <h4>since</h4>
  1027. <p>2.4.11</p>
  1028. <hr>
  1029. <h2 id="fallback-script">fallback-script<a class="headerlink" href="#fallback-script" title="Permanent link">&para;</a></h2>
  1030. <p><strong>Experimental only</strong></p>
  1031. <p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property). By default, this is <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_CJK</a></code>. Using the <code>fallback-script</code> property, this fallback value can be changed.</p>
  1032. <h4>note</h4>
  1033. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  1034. <p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code>, or by auto-hinting any glyph from that face. In particular, if you have already created an <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p>
  1035. <h4>example</h4>
  1036. <div class="highlight"><pre><span></span><code> FT_Library library;
  1037. FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
  1038. FT_Init_FreeType( &amp;library );
  1039. FT_Property_Set( library, &quot;autofitter&quot;,
  1040. &quot;fallback-script&quot;, &amp;fallback_script );
  1041. </code></pre></div>
  1042. <h4>since</h4>
  1043. <p>2.4.11</p>
  1044. <hr>
  1045. <h2 id="default-script">default-script<a class="headerlink" href="#default-script" title="Permanent link">&para;</a></h2>
  1046. <p><strong>Experimental only</strong></p>
  1047. <p>If FreeType gets compiled with <code>FT_CONFIG_OPTION_USE_HARFBUZZ</code> to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p>
  1048. <p>By default, this is <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_LATIN</a></code>. Using the <code>default-script</code> property, this default value can be changed.</p>
  1049. <h4>note</h4>
  1050. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  1051. <p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code>, or by auto-hinting any glyph from that face. In particular, if you have already created an <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p>
  1052. <h4>example</h4>
  1053. <div class="highlight"><pre><span></span><code> FT_Library library;
  1054. FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
  1055. FT_Init_FreeType( &amp;library );
  1056. FT_Property_Set( library, &quot;autofitter&quot;,
  1057. &quot;default-script&quot;, &amp;default_script );
  1058. </code></pre></div>
  1059. <h4>since</h4>
  1060. <p>2.5.3</p>
  1061. <hr>
  1062. <h2 id="increase-x-height">increase-x-height<a class="headerlink" href="#increase-x-height" title="Permanent link">&para;</a></h2>
  1063. <p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= <code>increase-x-height</code>, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p>
  1064. <h4>note</h4>
  1065. <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
  1066. <p>Set this value right after calling <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code>, but before loading any glyph (using the auto-hinter).</p>
  1067. <h4>example</h4>
  1068. <div class="highlight"><pre><span></span><code> FT_Library library;
  1069. FT_Face face;
  1070. FT_Prop_IncreaseXHeight prop;
  1071. FT_Init_FreeType( &amp;library );
  1072. FT_New_Face( library, &quot;foo.ttf&quot;, 0, &amp;face );
  1073. FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
  1074. prop.face = face;
  1075. prop.limit = 14;
  1076. FT_Property_Set( library, &quot;autofitter&quot;,
  1077. &quot;increase-x-height&quot;, &amp;prop );
  1078. </code></pre></div>
  1079. <h4>since</h4>
  1080. <p>2.4.11</p>
  1081. <hr>
  1082. <h2 id="ft_prop_increasexheight">FT_Prop_IncreaseXHeight<a class="headerlink" href="#ft_prop_increasexheight" title="Permanent link">&para;</a></h2>
  1083. <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
  1084. <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_IncreaseXHeight_
  1085. {
  1086. <a href="ft2-base_interface.html#ft_face">FT_Face</a> face;
  1087. <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> limit;
  1088. } <b>FT_Prop_IncreaseXHeight</b>;
  1089. </code></pre></div>
  1090. <p>The data exchange structure for the <code><a href="ft2-properties.html#increase-x-height">increase-x-height</a></code> property.</p>
  1091. <hr>
  1092. <h2 id="warping">warping<a class="headerlink" href="#warping" title="Permanent link">&para;</a></h2>
  1093. <p><strong>Obsolete</strong></p>
  1094. <p>This property was always experimental and probably never worked correctly. It was entirely removed from the FreeType&nbsp;2 sources. This entry is only here for historical reference.</p>
  1095. <p>Warping only worked in &lsquo;normal&rsquo; auto-hinting mode replacing it. The idea of the code was to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments were aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations were tried and scored.</p>
  1096. <h4>since</h4>
  1097. <p>2.6</p>
  1098. <hr>
  1099. </article>
  1100. </div>
  1101. </div>
  1102. </main>
  1103. <footer class="md-footer">
  1104. <nav class="md-footer__inner md-grid" aria-label="Footer">
  1105. <a href="ft2-pcf_driver.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The PCF driver" rel="prev">
  1106. <div class="md-footer__button md-icon">
  1107. <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>
  1108. </div>
  1109. <div class="md-footer__title">
  1110. <div class="md-ellipsis">
  1111. <span class="md-footer__direction">
  1112. Previous
  1113. </span>
  1114. The PCF driver
  1115. </div>
  1116. </div>
  1117. </a>
  1118. <a href="ft2-parameter_tags.html" class="md-footer__link md-footer__link--next" aria-label="Next: Parameter Tags" rel="next">
  1119. <div class="md-footer__title">
  1120. <div class="md-ellipsis">
  1121. <span class="md-footer__direction">
  1122. Next
  1123. </span>
  1124. Parameter Tags
  1125. </div>
  1126. </div>
  1127. <div class="md-footer__button md-icon">
  1128. <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>
  1129. </div>
  1130. </a>
  1131. </nav>
  1132. <div class="md-footer-meta md-typeset">
  1133. <div class="md-footer-meta__inner md-grid">
  1134. <div class="md-footer-copyright">
  1135. <div class="md-footer-copyright__highlight">
  1136. Copyright 2021 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
  1137. </div>
  1138. Made with
  1139. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  1140. Material for MkDocs
  1141. </a>
  1142. </div>
  1143. </div>
  1144. </div>
  1145. </footer>
  1146. </div>
  1147. <div class="md-dialog" data-md-component="dialog">
  1148. <div class="md-dialog__inner md-typeset"></div>
  1149. </div>
  1150. <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>
  1151. <script src="assets/javascripts/bundle.82b56eb2.min.js"></script>
  1152. <script src="javascripts/extra.js"></script>
  1153. </body>
  1154. </html>