6 <html lang="en" class="no-js">
10 <meta name="viewport" content="width=device-width,initial-scale=1">
11 <meta http-equiv="x-ua-compatible" content="ie=edge">
13 <meta name="description" content="API Reference Documentation for FreeType-2.10.4">
17 <meta name="author" content="FreeType Contributors">
20 <meta name="lang:clipboard.copy" content="Copy to clipboard">
22 <meta name="lang:clipboard.copied" content="Copied to clipboard">
24 <meta name="lang:search.language" content="en">
26 <meta name="lang:search.pipeline.stopwords" content="True">
28 <meta name="lang:search.pipeline.trimmer" content="True">
30 <meta name="lang:search.result.none" content="No matching documents">
32 <meta name="lang:search.result.one" content="1 matching document">
34 <meta name="lang:search.result.other" content="# matching documents">
36 <meta name="lang:search.tokenizer" content="[\s\-]+">
38 <link rel="shortcut icon" href="images/favico.ico">
39 <meta name="generator" content="mkdocs-1.1, mkdocs-material-4.6.3">
43 <title>Basic Data Types - FreeType-2.10.4 API Reference</title>
47 <link rel="stylesheet" href="assets/stylesheets/application.adb8469c.css">
49 <link rel="stylesheet" href="assets/stylesheets/application-palette.a8b3c06d.css">
54 <meta name="theme-color" content="#4caf50">
58 <script src="assets/javascripts/modernizr.86422ebf.js"></script>
62 <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
63 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback">
64 <style>body,input{font-family:"Noto Serif","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
67 <link rel="stylesheet" href="assets/fonts/material-icons.css">
70 <link rel="stylesheet" href="stylesheets/extra.css">
80 <body dir="ltr" data-md-color-primary="green" data-md-color-accent="green">
88 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
89 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
90 <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
92 <a href="#basic-data-types" tabindex="0" class="md-skip">
97 <header class="md-header" data-md-component="header">
98 <nav class="md-header-nav md-grid">
100 <div class="md-flex__cell md-flex__cell--shrink">
101 <a href="." title="FreeType-2.10.4 API Reference" aria-label="FreeType-2.10.4 API Reference" class="md-header-nav__button md-logo">
103 <img alt="logo" src="images/favico.ico" width="24" height="24">
107 <div class="md-flex__cell md-flex__cell--shrink">
108 <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
110 <div class="md-flex__cell md-flex__cell--stretch">
111 <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
113 <span class="md-header-nav__topic">
114 FreeType-2.10.4 API Reference
116 <span class="md-header-nav__topic">
124 <div class="md-flex__cell md-flex__cell--shrink">
126 <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
128 <div class="md-search" data-md-component="search" role="dialog">
129 <label class="md-search__overlay" for="__search"></label>
130 <div class="md-search__inner" role="search">
131 <form class="md-search__form" name="search">
132 <input type="text" class="md-search__input" aria-label="search" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
133 <label class="md-icon md-search__icon" for="__search"></label>
134 <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
138 <div class="md-search__output">
139 <div class="md-search__scrollwrap" data-md-scrollfix>
140 <div class="md-search-result" data-md-component="result">
141 <div class="md-search-result__meta">
142 Type to start searching
144 <ol class="md-search-result__list"></ol>
157 <div class="md-container">
162 <main class="md-main" role="main">
163 <div class="md-main__inner md-grid" data-md-component="container">
166 <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
167 <div class="md-sidebar__scrollwrap">
168 <div class="md-sidebar__inner">
169 <nav class="md-nav md-nav--primary" data-md-level="0">
170 <label class="md-nav__title md-nav__title--site" for="__drawer">
171 <a href="." title="FreeType-2.10.4 API Reference" class="md-nav__button md-logo">
173 <img alt="logo" src="images/favico.ico" width="48" height="48">
176 FreeType-2.10.4 API Reference
179 <ul class="md-nav__list" data-md-scrollfix>
186 <li class="md-nav__item">
187 <a href="index.html" title="TOC" class="md-nav__link">
198 <li class="md-nav__item">
199 <a href="ft2-index.html" title="Index" class="md-nav__link">
210 <li class="md-nav__item md-nav__item--nested">
212 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
214 <label class="md-nav__link" for="nav-3">
217 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
218 <label class="md-nav__title" for="nav-3">
221 <ul class="md-nav__list" data-md-scrollfix>
229 <li class="md-nav__item">
230 <a href="ft2-header_inclusion.html" title="FreeType's header inclusion scheme" class="md-nav__link">
231 FreeType's header inclusion scheme
241 <li class="md-nav__item">
242 <a href="ft2-user_allocation.html" title="User allocation" class="md-nav__link">
260 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
262 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" checked>
264 <label class="md-nav__link" for="nav-4">
267 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
268 <label class="md-nav__title" for="nav-4">
271 <ul class="md-nav__list" data-md-scrollfix>
279 <li class="md-nav__item">
280 <a href="ft2-version.html" title="FreeType Version" class="md-nav__link">
293 <li class="md-nav__item md-nav__item--active">
295 <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
300 <label class="md-nav__link md-nav__link--active" for="__toc">
304 <a href="ft2-basic_types.html" title="Basic Data Types" class="md-nav__link md-nav__link--active">
309 <nav class="md-nav md-nav--secondary">
315 <label class="md-nav__title" for="__toc">Table of contents</label>
316 <ul class="md-nav__list" data-md-scrollfix>
318 <li class="md-nav__item">
319 <a href="#synopsis" class="md-nav__link">
325 <li class="md-nav__item">
326 <a href="#ft_byte" class="md-nav__link">
332 <li class="md-nav__item">
333 <a href="#ft_bytes" class="md-nav__link">
339 <li class="md-nav__item">
340 <a href="#ft_char" class="md-nav__link">
346 <li class="md-nav__item">
347 <a href="#ft_int" class="md-nav__link">
353 <li class="md-nav__item">
354 <a href="#ft_uint" class="md-nav__link">
360 <li class="md-nav__item">
361 <a href="#ft_int16" class="md-nav__link">
367 <li class="md-nav__item">
368 <a href="#ft_uint16" class="md-nav__link">
374 <li class="md-nav__item">
375 <a href="#ft_int32" class="md-nav__link">
381 <li class="md-nav__item">
382 <a href="#ft_uint32" class="md-nav__link">
388 <li class="md-nav__item">
389 <a href="#ft_int64" class="md-nav__link">
395 <li class="md-nav__item">
396 <a href="#ft_uint64" class="md-nav__link">
402 <li class="md-nav__item">
403 <a href="#ft_short" class="md-nav__link">
409 <li class="md-nav__item">
410 <a href="#ft_ushort" class="md-nav__link">
416 <li class="md-nav__item">
417 <a href="#ft_long" class="md-nav__link">
423 <li class="md-nav__item">
424 <a href="#ft_ulong" class="md-nav__link">
430 <li class="md-nav__item">
431 <a href="#ft_bool" class="md-nav__link">
437 <li class="md-nav__item">
438 <a href="#ft_offset" class="md-nav__link">
444 <li class="md-nav__item">
445 <a href="#ft_ptrdist" class="md-nav__link">
451 <li class="md-nav__item">
452 <a href="#ft_string" class="md-nav__link">
458 <li class="md-nav__item">
459 <a href="#ft_tag" class="md-nav__link">
465 <li class="md-nav__item">
466 <a href="#ft_error" class="md-nav__link">
472 <li class="md-nav__item">
473 <a href="#ft_fixed" class="md-nav__link">
479 <li class="md-nav__item">
480 <a href="#ft_pointer" class="md-nav__link">
486 <li class="md-nav__item">
487 <a href="#ft_pos" class="md-nav__link">
493 <li class="md-nav__item">
494 <a href="#ft_vector" class="md-nav__link">
500 <li class="md-nav__item">
501 <a href="#ft_bbox" class="md-nav__link">
507 <li class="md-nav__item">
508 <a href="#ft_matrix" class="md-nav__link">
514 <li class="md-nav__item">
515 <a href="#ft_fword" class="md-nav__link">
521 <li class="md-nav__item">
522 <a href="#ft_ufword" class="md-nav__link">
528 <li class="md-nav__item">
529 <a href="#ft_f2dot14" class="md-nav__link">
535 <li class="md-nav__item">
536 <a href="#ft_unitvector" class="md-nav__link">
542 <li class="md-nav__item">
543 <a href="#ft_f26dot6" class="md-nav__link">
549 <li class="md-nav__item">
550 <a href="#ft_data" class="md-nav__link">
556 <li class="md-nav__item">
557 <a href="#ft_make_tag" class="md-nav__link">
563 <li class="md-nav__item">
564 <a href="#ft_generic" class="md-nav__link">
570 <li class="md-nav__item">
571 <a href="#ft_generic_finalizer" class="md-nav__link">
577 <li class="md-nav__item">
578 <a href="#ft_bitmap" class="md-nav__link">
584 <li class="md-nav__item">
585 <a href="#ft_pixel_mode" class="md-nav__link">
591 <li class="md-nav__item">
592 <a href="#ft_glyph_format" class="md-nav__link">
598 <li class="md-nav__item">
599 <a href="#ft_image_tag" class="md-nav__link">
621 <li class="md-nav__item">
622 <a href="ft2-base_interface.html" title="Base Interface" class="md-nav__link">
633 <li class="md-nav__item">
634 <a href="ft2-glyph_variants.html" title="Unicode Variation Sequences" class="md-nav__link">
635 Unicode Variation Sequences
645 <li class="md-nav__item">
646 <a href="ft2-color_management.html" title="Glyph Color Management" class="md-nav__link">
647 Glyph Color Management
657 <li class="md-nav__item">
658 <a href="ft2-layer_management.html" title="Glyph Layer Management" class="md-nav__link">
659 Glyph Layer Management
669 <li class="md-nav__item">
670 <a href="ft2-glyph_management.html" title="Glyph Management" class="md-nav__link">
681 <li class="md-nav__item">
682 <a href="ft2-mac_specific.html" title="Mac Specific Interface" class="md-nav__link">
683 Mac Specific Interface
693 <li class="md-nav__item">
694 <a href="ft2-sizes_management.html" title="Size Management" class="md-nav__link">
705 <li class="md-nav__item">
706 <a href="ft2-header_file_macros.html" title="Header File Macros" class="md-nav__link">
722 <li class="md-nav__item md-nav__item--nested">
724 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
726 <label class="md-nav__link" for="nav-5">
729 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
730 <label class="md-nav__title" for="nav-5">
733 <ul class="md-nav__list" data-md-scrollfix>
741 <li class="md-nav__item">
742 <a href="ft2-multiple_masters.html" title="Multiple Masters" class="md-nav__link">
753 <li class="md-nav__item">
754 <a href="ft2-truetype_tables.html" title="TrueType Tables" class="md-nav__link">
765 <li class="md-nav__item">
766 <a href="ft2-type1_tables.html" title="Type 1 Tables" class="md-nav__link">
777 <li class="md-nav__item">
778 <a href="ft2-sfnt_names.html" title="SFNT Names" class="md-nav__link">
789 <li class="md-nav__item">
790 <a href="ft2-bdf_fonts.html" title="BDF and PCF Files" class="md-nav__link">
801 <li class="md-nav__item">
802 <a href="ft2-cid_fonts.html" title="CID Fonts" class="md-nav__link">
813 <li class="md-nav__item">
814 <a href="ft2-pfr_fonts.html" title="PFR Fonts" class="md-nav__link">
825 <li class="md-nav__item">
826 <a href="ft2-winfnt_fonts.html" title="Window FNT Files" class="md-nav__link">
837 <li class="md-nav__item">
838 <a href="ft2-font_formats.html" title="Font Formats" class="md-nav__link">
849 <li class="md-nav__item">
850 <a href="ft2-gasp_table.html" title="Gasp Table" class="md-nav__link">
866 <li class="md-nav__item md-nav__item--nested">
868 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
870 <label class="md-nav__link" for="nav-6">
871 Controlling FreeType Modules
873 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
874 <label class="md-nav__title" for="nav-6">
875 Controlling FreeType Modules
877 <ul class="md-nav__list" data-md-scrollfix>
885 <li class="md-nav__item">
886 <a href="ft2-auto_hinter.html" title="The auto-hinter" class="md-nav__link">
897 <li class="md-nav__item">
898 <a href="ft2-cff_driver.html" title="The CFF driver" class="md-nav__link">
909 <li class="md-nav__item">
910 <a href="ft2-t1_cid_driver.html" title="The Type 1 and CID drivers" class="md-nav__link">
911 The Type 1 and CID drivers
921 <li class="md-nav__item">
922 <a href="ft2-tt_driver.html" title="The TrueType driver" class="md-nav__link">
933 <li class="md-nav__item">
934 <a href="ft2-pcf_driver.html" title="The PCF driver" class="md-nav__link">
945 <li class="md-nav__item">
946 <a href="ft2-properties.html" title="Driver properties" class="md-nav__link">
957 <li class="md-nav__item">
958 <a href="ft2-parameter_tags.html" title="Parameter Tags" class="md-nav__link">
969 <li class="md-nav__item">
970 <a href="ft2-lcd_rendering.html" title="Subpixel Rendering" class="md-nav__link">
986 <li class="md-nav__item md-nav__item--nested">
988 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">
990 <label class="md-nav__link" for="nav-7">
993 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
994 <label class="md-nav__title" for="nav-7">
997 <ul class="md-nav__list" data-md-scrollfix>
1005 <li class="md-nav__item">
1006 <a href="ft2-cache_subsystem.html" title="Cache Sub-System" class="md-nav__link">
1022 <li class="md-nav__item md-nav__item--nested">
1024 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8">
1026 <label class="md-nav__link" for="nav-8">
1029 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1030 <label class="md-nav__title" for="nav-8">
1033 <ul class="md-nav__list" data-md-scrollfix>
1041 <li class="md-nav__item">
1042 <a href="ft2-computations.html" title="Computations" class="md-nav__link">
1053 <li class="md-nav__item">
1054 <a href="ft2-list_processing.html" title="List Processing" class="md-nav__link">
1065 <li class="md-nav__item">
1066 <a href="ft2-outline_processing.html" title="Outline Processing" class="md-nav__link">
1077 <li class="md-nav__item">
1078 <a href="ft2-quick_advance.html" title="Quick retrieval of advance values" class="md-nav__link">
1079 Quick retrieval of advance values
1089 <li class="md-nav__item">
1090 <a href="ft2-bitmap_handling.html" title="Bitmap Handling" class="md-nav__link">
1101 <li class="md-nav__item">
1102 <a href="ft2-raster.html" title="Scanline Converter" class="md-nav__link">
1113 <li class="md-nav__item">
1114 <a href="ft2-glyph_stroker.html" title="Glyph Stroker" class="md-nav__link">
1125 <li class="md-nav__item">
1126 <a href="ft2-system_interface.html" title="System Interface" class="md-nav__link">
1137 <li class="md-nav__item">
1138 <a href="ft2-module_management.html" title="Module Management" class="md-nav__link">
1149 <li class="md-nav__item">
1150 <a href="ft2-gzip.html" title="GZIP Streams" class="md-nav__link">
1161 <li class="md-nav__item">
1162 <a href="ft2-lzw.html" title="LZW Streams" class="md-nav__link">
1173 <li class="md-nav__item">
1174 <a href="ft2-bzip2.html" title="BZIP2 Streams" class="md-nav__link">
1190 <li class="md-nav__item md-nav__item--nested">
1192 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9">
1194 <label class="md-nav__link" for="nav-9">
1197 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1198 <label class="md-nav__title" for="nav-9">
1201 <ul class="md-nav__list" data-md-scrollfix>
1209 <li class="md-nav__item">
1210 <a href="ft2-error_enumerations.html" title="Error Enumerations" class="md-nav__link">
1221 <li class="md-nav__item">
1222 <a href="ft2-error_code_values.html" title="Error Code Values" class="md-nav__link">
1238 <li class="md-nav__item md-nav__item--nested">
1240 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
1242 <label class="md-nav__link" for="nav-10">
1245 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1246 <label class="md-nav__title" for="nav-10">
1249 <ul class="md-nav__list" data-md-scrollfix>
1257 <li class="md-nav__item">
1258 <a href="ft2-gx_validation.html" title="TrueTypeGX/AAT Validation" class="md-nav__link">
1259 TrueTypeGX/AAT Validation
1269 <li class="md-nav__item">
1270 <a href="ft2-incremental.html" title="Incremental Loading" class="md-nav__link">
1281 <li class="md-nav__item">
1282 <a href="ft2-truetype_engine.html" title="The TrueType Engine" class="md-nav__link">
1293 <li class="md-nav__item">
1294 <a href="ft2-ot_validation.html" title="OpenType Validation" class="md-nav__link">
1312 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
1313 <div class="md-sidebar__scrollwrap">
1314 <div class="md-sidebar__inner">
1316 <nav class="md-nav md-nav--secondary">
1322 <label class="md-nav__title" for="__toc">Table of contents</label>
1323 <ul class="md-nav__list" data-md-scrollfix>
1325 <li class="md-nav__item">
1326 <a href="#synopsis" class="md-nav__link">
1332 <li class="md-nav__item">
1333 <a href="#ft_byte" class="md-nav__link">
1339 <li class="md-nav__item">
1340 <a href="#ft_bytes" class="md-nav__link">
1346 <li class="md-nav__item">
1347 <a href="#ft_char" class="md-nav__link">
1353 <li class="md-nav__item">
1354 <a href="#ft_int" class="md-nav__link">
1360 <li class="md-nav__item">
1361 <a href="#ft_uint" class="md-nav__link">
1367 <li class="md-nav__item">
1368 <a href="#ft_int16" class="md-nav__link">
1374 <li class="md-nav__item">
1375 <a href="#ft_uint16" class="md-nav__link">
1381 <li class="md-nav__item">
1382 <a href="#ft_int32" class="md-nav__link">
1388 <li class="md-nav__item">
1389 <a href="#ft_uint32" class="md-nav__link">
1395 <li class="md-nav__item">
1396 <a href="#ft_int64" class="md-nav__link">
1402 <li class="md-nav__item">
1403 <a href="#ft_uint64" class="md-nav__link">
1409 <li class="md-nav__item">
1410 <a href="#ft_short" class="md-nav__link">
1416 <li class="md-nav__item">
1417 <a href="#ft_ushort" class="md-nav__link">
1423 <li class="md-nav__item">
1424 <a href="#ft_long" class="md-nav__link">
1430 <li class="md-nav__item">
1431 <a href="#ft_ulong" class="md-nav__link">
1437 <li class="md-nav__item">
1438 <a href="#ft_bool" class="md-nav__link">
1444 <li class="md-nav__item">
1445 <a href="#ft_offset" class="md-nav__link">
1451 <li class="md-nav__item">
1452 <a href="#ft_ptrdist" class="md-nav__link">
1458 <li class="md-nav__item">
1459 <a href="#ft_string" class="md-nav__link">
1465 <li class="md-nav__item">
1466 <a href="#ft_tag" class="md-nav__link">
1472 <li class="md-nav__item">
1473 <a href="#ft_error" class="md-nav__link">
1479 <li class="md-nav__item">
1480 <a href="#ft_fixed" class="md-nav__link">
1486 <li class="md-nav__item">
1487 <a href="#ft_pointer" class="md-nav__link">
1493 <li class="md-nav__item">
1494 <a href="#ft_pos" class="md-nav__link">
1500 <li class="md-nav__item">
1501 <a href="#ft_vector" class="md-nav__link">
1507 <li class="md-nav__item">
1508 <a href="#ft_bbox" class="md-nav__link">
1514 <li class="md-nav__item">
1515 <a href="#ft_matrix" class="md-nav__link">
1521 <li class="md-nav__item">
1522 <a href="#ft_fword" class="md-nav__link">
1528 <li class="md-nav__item">
1529 <a href="#ft_ufword" class="md-nav__link">
1535 <li class="md-nav__item">
1536 <a href="#ft_f2dot14" class="md-nav__link">
1542 <li class="md-nav__item">
1543 <a href="#ft_unitvector" class="md-nav__link">
1549 <li class="md-nav__item">
1550 <a href="#ft_f26dot6" class="md-nav__link">
1556 <li class="md-nav__item">
1557 <a href="#ft_data" class="md-nav__link">
1563 <li class="md-nav__item">
1564 <a href="#ft_make_tag" class="md-nav__link">
1570 <li class="md-nav__item">
1571 <a href="#ft_generic" class="md-nav__link">
1577 <li class="md-nav__item">
1578 <a href="#ft_generic_finalizer" class="md-nav__link">
1579 FT_Generic_Finalizer
1584 <li class="md-nav__item">
1585 <a href="#ft_bitmap" class="md-nav__link">
1591 <li class="md-nav__item">
1592 <a href="#ft_pixel_mode" class="md-nav__link">
1598 <li class="md-nav__item">
1599 <a href="#ft_glyph_format" class="md-nav__link">
1605 <li class="md-nav__item">
1606 <a href="#ft_image_tag" class="md-nav__link">
1624 <div class="md-content">
1625 <article class="md-content__inner md-typeset">
1629 <p><a href="https://www.freetype.org">FreeType</a> » <a href="../">Docs</a> » <a href="index.html#core-api">Core API</a> » Basic Data Types</p>
1631 <h1 id="basic-data-types">Basic Data Types<a class="headerlink" href="#basic-data-types" title="Permanent link">¶</a></h1>
1632 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">¶</a></h2>
1633 <p>This section contains the basic data types defined by FreeType 2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.</p>
1634 <h2 id="ft_byte">FT_Byte<a class="headerlink" href="#ft_byte" title="Permanent link">¶</a></h2>
1635 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1636 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <b>FT_Byte</b>;
1639 <p>A simple typedef for the <em>unsigned</em> char type.</p>
1642 <h2 id="ft_bytes">FT_Bytes<a class="headerlink" href="#ft_bytes" title="Permanent link">¶</a></h2>
1643 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1644 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* <b>FT_Bytes</b>;
1647 <p>A typedef for constant memory areas.</p>
1650 <h2 id="ft_char">FT_Char<a class="headerlink" href="#ft_char" title="Permanent link">¶</a></h2>
1651 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1652 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">char</span> <b>FT_Char</b>;
1655 <p>A simple typedef for the <em>signed</em> char type.</p>
1658 <h2 id="ft_int">FT_Int<a class="headerlink" href="#ft_int" title="Permanent link">¶</a></h2>
1659 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1660 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">int</span> <b>FT_Int</b>;
1663 <p>A typedef for the int type.</p>
1666 <h2 id="ft_uint">FT_UInt<a class="headerlink" href="#ft_uint" title="Permanent link">¶</a></h2>
1667 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1668 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <b>FT_UInt</b>;
1671 <p>A typedef for the unsigned int type.</p>
1674 <h2 id="ft_int16">FT_Int16<a class="headerlink" href="#ft_int16" title="Permanent link">¶</a></h2>
1675 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_Int16</b>;
1678 <p>A typedef for a 16bit signed integer type.</p>
1681 <h2 id="ft_uint16">FT_UInt16<a class="headerlink" href="#ft_uint16" title="Permanent link">¶</a></h2>
1682 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UInt16</b>;
1685 <p>A typedef for a 16bit unsigned integer type.</p>
1688 <h2 id="ft_int32">FT_Int32<a class="headerlink" href="#ft_int32" title="Permanent link">¶</a></h2>
1689 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX <b>FT_Int32</b>;
1692 <p>A typedef for a 32bit signed integer type. The size depends on the configuration.</p>
1695 <h2 id="ft_uint32">FT_UInt32<a class="headerlink" href="#ft_uint32" title="Permanent link">¶</a></h2>
1696 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt32</b>;
1701 <h2 id="ft_int64">FT_Int64<a class="headerlink" href="#ft_int64" title="Permanent link">¶</a></h2>
1702 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX <b>FT_Int64</b>;
1707 <h2 id="ft_uint64">FT_UInt64<a class="headerlink" href="#ft_uint64" title="Permanent link">¶</a></h2>
1708 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt64</b>;
1713 <h2 id="ft_short">FT_Short<a class="headerlink" href="#ft_short" title="Permanent link">¶</a></h2>
1714 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1715 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_Short</b>;
1718 <p>A typedef for signed short.</p>
1721 <h2 id="ft_ushort">FT_UShort<a class="headerlink" href="#ft_ushort" title="Permanent link">¶</a></h2>
1722 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1723 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UShort</b>;
1726 <p>A typedef for unsigned short.</p>
1729 <h2 id="ft_long">FT_Long<a class="headerlink" href="#ft_long" title="Permanent link">¶</a></h2>
1730 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1731 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Long</b>;
1734 <p>A typedef for signed long.</p>
1737 <h2 id="ft_ulong">FT_ULong<a class="headerlink" href="#ft_ulong" title="Permanent link">¶</a></h2>
1738 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1739 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <b>FT_ULong</b>;
1742 <p>A typedef for unsigned long.</p>
1745 <h2 id="ft_bool">FT_Bool<a class="headerlink" href="#ft_bool" title="Permanent link">¶</a></h2>
1746 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1747 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <b>FT_Bool</b>;
1750 <p>A typedef of unsigned char, used for simple booleans. As usual, values 1 and 0 represent true and false, respectively.</p>
1753 <h2 id="ft_offset">FT_Offset<a class="headerlink" href="#ft_offset" title="Permanent link">¶</a></h2>
1754 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1755 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> size_t <b>FT_Offset</b>;
1758 <p>This is equivalent to the ANSI C <code>size_t</code> type, i.e., the largest <em>unsigned</em> integer type used to express a file size or position, or a memory block size.</p>
1761 <h2 id="ft_ptrdist">FT_PtrDist<a class="headerlink" href="#ft_ptrdist" title="Permanent link">¶</a></h2>
1762 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1763 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> ft_ptrdiff_t <b>FT_PtrDist</b>;
1766 <p>This is equivalent to the ANSI C <code>ptrdiff_t</code> type, i.e., the largest <em>signed</em> integer type used to express the distance between two pointers.</p>
1769 <h2 id="ft_string">FT_String<a class="headerlink" href="#ft_string" title="Permanent link">¶</a></h2>
1770 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1771 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">char</span> <b>FT_String</b>;
1774 <p>A simple typedef for the char type, usually used for strings.</p>
1777 <h2 id="ft_tag">FT_Tag<a class="headerlink" href="#ft_tag" title="Permanent link">¶</a></h2>
1778 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1779 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a> <b>FT_Tag</b>;
1782 <p>A typedef for 32-bit tags (as used in the SFNT format).</p>
1785 <h2 id="ft_error">FT_Error<a class="headerlink" href="#ft_error" title="Permanent link">¶</a></h2>
1786 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1787 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> <b>FT_Error</b>;
1790 <p>The FreeType error code type. A value of 0 is always interpreted as a successful operation.</p>
1793 <h2 id="ft_fixed">FT_Fixed<a class="headerlink" href="#ft_fixed" title="Permanent link">¶</a></h2>
1794 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1795 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Fixed</b>;
1798 <p>This type is used to store 16.16 fixed-point values, like scaling values or matrix coefficients.</p>
1801 <h2 id="ft_pointer">FT_Pointer<a class="headerlink" href="#ft_pointer" title="Permanent link">¶</a></h2>
1802 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1803 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span>* <b>FT_Pointer</b>;
1806 <p>A simple typedef for a typeless pointer.</p>
1809 <h2 id="ft_pos">FT_Pos<a class="headerlink" href="#ft_pos" title="Permanent link">¶</a></h2>
1810 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1811 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Pos</b>;
1814 <p>The type FT_Pos is used to store vectorial coordinates. Depending on the context, these can represent distances in integer font units, or 16.16, or 26.6 fixed-point pixel coordinates.</p>
1817 <h2 id="ft_vector">FT_Vector<a class="headerlink" href="#ft_vector" title="Permanent link">¶</a></h2>
1818 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1819 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Vector_
1821 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> x;
1822 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> y;
1827 <p>A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.</p>
1830 <table class="fields">
1831 <tr><td class="val" id="x">x</td><td class="desc">
1832 <p>The horizontal coordinate.</p>
1834 <tr><td class="val" id="y">y</td><td class="desc">
1835 <p>The vertical coordinate.</p>
1841 <h2 id="ft_bbox">FT_BBox<a class="headerlink" href="#ft_bbox" title="Permanent link">¶</a></h2>
1842 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1843 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BBox_
1845 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xMin, yMin;
1846 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xMax, yMax;
1851 <p>A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.</p>
1854 <table class="fields">
1855 <tr><td class="val" id="xmin">xMin</td><td class="desc">
1856 <p>The horizontal minimum (left-most).</p>
1858 <tr><td class="val" id="ymin">yMin</td><td class="desc">
1859 <p>The vertical minimum (bottom-most).</p>
1861 <tr><td class="val" id="xmax">xMax</td><td class="desc">
1862 <p>The horizontal maximum (right-most).</p>
1864 <tr><td class="val" id="ymax">yMax</td><td class="desc">
1865 <p>The vertical maximum (top-most).</p>
1871 <p>The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called (llx,lly) and (urx,ury), respectively.</p>
1872 <p>If <code>yMin</code> is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if <code>ymax</code> is positive, this value gives the glyph's ascender.</p>
1873 <p><code>xMin</code> gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If <code>xMin</code> is negative, the glyph extends to the left of the origin.</p>
1876 <h2 id="ft_matrix">FT_Matrix<a class="headerlink" href="#ft_matrix" title="Permanent link">¶</a></h2>
1877 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1878 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Matrix_
1880 <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> xx, xy;
1881 <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> yx, yy;
1886 <p>A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is:
1887 <div class="highlight"><pre><span></span><code> x' = x*xx + y*xy
1888 y' = x*yx + y*yy
1889 </code></pre></div></p>
1892 <table class="fields">
1893 <tr><td class="val" id="xx">xx</td><td class="desc">
1894 <p>Matrix coefficient.</p>
1896 <tr><td class="val" id="xy">xy</td><td class="desc">
1897 <p>Matrix coefficient.</p>
1899 <tr><td class="val" id="yx">yx</td><td class="desc">
1900 <p>Matrix coefficient.</p>
1902 <tr><td class="val" id="yy">yy</td><td class="desc">
1903 <p>Matrix coefficient.</p>
1909 <h2 id="ft_fword">FT_FWord<a class="headerlink" href="#ft_fword" title="Permanent link">¶</a></h2>
1910 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1911 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_FWord</b>; /* distance in FUnits */
1914 <p>A signed 16-bit integer used to store a distance in original font units.</p>
1917 <h2 id="ft_ufword">FT_UFWord<a class="headerlink" href="#ft_ufword" title="Permanent link">¶</a></h2>
1918 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1919 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UFWord</b>; /* <span class="keyword">unsigned</span> distance */
1922 <p>An unsigned 16-bit integer used to store a distance in original font units.</p>
1925 <h2 id="ft_f2dot14">FT_F2Dot14<a class="headerlink" href="#ft_f2dot14" title="Permanent link">¶</a></h2>
1926 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1927 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_F2Dot14</b>;
1930 <p>A signed 2.14 fixed-point type used for unit vectors.</p>
1933 <h2 id="ft_unitvector">FT_UnitVector<a class="headerlink" href="#ft_unitvector" title="Permanent link">¶</a></h2>
1934 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1935 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_UnitVector_
1937 <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a> x;
1938 <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a> y;
1940 } <b>FT_UnitVector</b>;
1943 <p>A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.</p>
1946 <table class="fields">
1947 <tr><td class="val" id="x">x</td><td class="desc">
1948 <p>Horizontal coordinate.</p>
1950 <tr><td class="val" id="y">y</td><td class="desc">
1951 <p>Vertical coordinate.</p>
1957 <h2 id="ft_f26dot6">FT_F26Dot6<a class="headerlink" href="#ft_f26dot6" title="Permanent link">¶</a></h2>
1958 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1959 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_F26Dot6</b>;
1962 <p>A signed 26.6 fixed-point type used for vectorial pixel coordinates.</p>
1965 <h2 id="ft_data">FT_Data<a class="headerlink" href="#ft_data" title="Permanent link">¶</a></h2>
1966 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1967 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Data_
1969 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* pointer;
1970 <a href="ft2-basic_types.html#ft_int">FT_Int</a> length;
1975 <p>Read-only binary data represented as a pointer and a length.</p>
1978 <table class="fields">
1979 <tr><td class="val" id="pointer">pointer</td><td class="desc">
1982 <tr><td class="val" id="length">length</td><td class="desc">
1983 <p>The length of the data in bytes.</p>
1989 <h2 id="ft_make_tag">FT_MAKE_TAG<a class="headerlink" href="#ft_make_tag" title="Permanent link">¶</a></h2>
1990 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
1991 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_MAKE_TAG</b>( _x1, _x2, _x3, _x4 ) \
1992 (<a href="ft2-basic_types.html#ft_tag">FT_Tag</a>) \
1993 ( ( (<a href="ft2-basic_types.html#ft_ulong">FT_ULong</a>)_x1 << 24 ) | \
1994 ( (<a href="ft2-basic_types.html#ft_ulong">FT_ULong</a>)_x2 << 16 ) | \
1995 ( (<a href="ft2-basic_types.html#ft_ulong">FT_ULong</a>)_x3 << 8 ) | \
1996 (<a href="ft2-basic_types.html#ft_ulong">FT_ULong</a>)_x4 )
1999 <p>This macro converts four-letter tags that are used to label TrueType tables into an unsigned long, to be used within FreeType.</p>
2002 <p>The produced values <strong>must</strong> be 32-bit integers. Don't redefine this macro.</p>
2005 <h2 id="ft_generic">FT_Generic<a class="headerlink" href="#ft_generic" title="Permanent link">¶</a></h2>
2006 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
2007 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Generic_
2009 <span class="keyword">void</span>* data;
2010 <a href="ft2-basic_types.html#ft_generic_finalizer">FT_Generic_Finalizer</a> finalizer;
2012 } <b>FT_Generic</b>;
2015 <p>Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.</p>
2016 <p>Some FreeType object contains a <code>generic</code> field, of type <code>FT_Generic</code>, which usage is left to client applications and font servers.</p>
2017 <p>It can be used to store a pointer to client-specific data, as well as the address of a ‘finalizer’ function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the <code>finalizer</code> field).</p>
2020 <table class="fields">
2021 <tr><td class="val" id="data">data</td><td class="desc">
2022 <p>A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.</p>
2024 <tr><td class="val" id="finalizer">finalizer</td><td class="desc">
2025 <p>A pointer to a ‘generic finalizer’ function, which will be called when the object is destroyed. If this field is set to <code>NULL</code>, no code will be called.</p>
2031 <h2 id="ft_generic_finalizer">FT_Generic_Finalizer<a class="headerlink" href="#ft_generic_finalizer" title="Permanent link">¶</a></h2>
2032 <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p>
2033 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Generic_Finalizer</b>)( <span class="keyword">void</span>* object );
2036 <p>Describe a function used to destroy the ‘client’ data of any FreeType object. See the description of the <code><a href="ft2-basic_types.html#ft_generic">FT_Generic</a></code> type for details of usage.</p>
2039 <p>The address of the FreeType object that is under finalization. Its client data is accessed through its <code>generic</code> field.</p>
2042 <h2 id="ft_bitmap">FT_Bitmap<a class="headerlink" href="#ft_bitmap" title="Permanent link">¶</a></h2>
2043 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
2044 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Bitmap_
2046 <span class="keyword">unsigned</span> <span class="keyword">int</span> rows;
2047 <span class="keyword">unsigned</span> <span class="keyword">int</span> width;
2048 <span class="keyword">int</span> pitch;
2049 <span class="keyword">unsigned</span> <span class="keyword">char</span>* buffer;
2050 <span class="keyword">unsigned</span> <span class="keyword">short</span> num_grays;
2051 <span class="keyword">unsigned</span> <span class="keyword">char</span> pixel_mode;
2052 <span class="keyword">unsigned</span> <span class="keyword">char</span> palette_mode;
2053 <span class="keyword">void</span>* palette;
2058 <p>A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the <code>pixel_mode</code> field.</p>
2061 <table class="fields">
2062 <tr><td class="val" id="rows">rows</td><td class="desc">
2063 <p>The number of bitmap rows.</p>
2065 <tr><td class="val" id="width">width</td><td class="desc">
2066 <p>The number of pixels in bitmap row.</p>
2068 <tr><td class="val" id="pitch">pitch</td><td class="desc">
2069 <p>The pitch's absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a ‘down’ flow, and negative when it has an ‘up’ flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.</p>
2070 <p>Note that ‘padding’ means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value.</p>
2071 <p>For the B/W rasterizer, <code>pitch</code> is always an even number.</p>
2072 <p>To change the pitch of a bitmap (say, to make it a multiple of 4), use <code><a href="ft2-bitmap_handling.html#ft_bitmap_convert">FT_Bitmap_Convert</a></code>. Alternatively, you might use callback functions to directly render to the application's surface; see the file <code>example2.cpp</code> in the tutorial for a demonstration.</p>
2074 <tr><td class="val" id="buffer">buffer</td><td class="desc">
2075 <p>A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.</p>
2077 <tr><td class="val" id="num_grays">num_grays</td><td class="desc">
2078 <p>This field is only used with <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY</a></code>; it gives the number of gray levels used in the bitmap.</p>
2080 <tr><td class="val" id="pixel_mode">pixel_mode</td><td class="desc">
2081 <p>The pixel mode, i.e., how pixel bits are stored. See <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_Pixel_Mode</a></code> for possible values.</p>
2083 <tr><td class="val" id="palette_mode">palette_mode</td><td class="desc">
2084 <p>This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.</p>
2086 <tr><td class="val" id="palette">palette</td><td class="desc">
2087 <p>A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.</p>
2093 <h2 id="ft_pixel_mode">FT_Pixel_Mode<a class="headerlink" href="#ft_pixel_mode" title="Permanent link">¶</a></h2>
2094 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
2095 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Pixel_Mode_
2097 <a href="ft2-basic_types.html#ft_pixel_mode_none">FT_PIXEL_MODE_NONE</a> = 0,
2098 <a href="ft2-basic_types.html#ft_pixel_mode_mono">FT_PIXEL_MODE_MONO</a>,
2099 <a href="ft2-basic_types.html#ft_pixel_mode_gray">FT_PIXEL_MODE_GRAY</a>,
2100 <a href="ft2-basic_types.html#ft_pixel_mode_gray2">FT_PIXEL_MODE_GRAY2</a>,
2101 <a href="ft2-basic_types.html#ft_pixel_mode_gray4">FT_PIXEL_MODE_GRAY4</a>,
2102 <a href="ft2-basic_types.html#ft_pixel_mode_lcd">FT_PIXEL_MODE_LCD</a>,
2103 <a href="ft2-basic_types.html#ft_pixel_mode_lcd_v">FT_PIXEL_MODE_LCD_V</a>,
2104 <a href="ft2-basic_types.html#ft_pixel_mode_bgra">FT_PIXEL_MODE_BGRA</a>,
2106 FT_PIXEL_MODE_MAX /* do not remove */
2108 } <b>FT_Pixel_Mode</b>;
2111 /* these constants are deprecated; use the corresponding `<b>FT_Pixel_Mode</b>` */
2112 /* values instead. */
2113 #<span class="keyword">define</span> ft_pixel_mode_none <a href="ft2-basic_types.html#ft_pixel_mode_none">FT_PIXEL_MODE_NONE</a>
2114 #<span class="keyword">define</span> ft_pixel_mode_mono <a href="ft2-basic_types.html#ft_pixel_mode_mono">FT_PIXEL_MODE_MONO</a>
2115 #<span class="keyword">define</span> ft_pixel_mode_grays <a href="ft2-basic_types.html#ft_pixel_mode_gray">FT_PIXEL_MODE_GRAY</a>
2116 #<span class="keyword">define</span> ft_pixel_mode_pal2 <a href="ft2-basic_types.html#ft_pixel_mode_gray2">FT_PIXEL_MODE_GRAY2</a>
2117 #<span class="keyword">define</span> ft_pixel_mode_pal4 <a href="ft2-basic_types.html#ft_pixel_mode_gray4">FT_PIXEL_MODE_GRAY4</a>
2120 <p>An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.</p>
2123 <table class="fields">
2124 <tr><td class="val" id="ft_pixel_mode_none">FT_PIXEL_MODE_NONE</td><td class="desc">
2125 <p>Value 0 is reserved.</p>
2127 <tr><td class="val" id="ft_pixel_mode_mono">FT_PIXEL_MODE_MONO</td><td class="desc">
2128 <p>A monochrome bitmap, using 1 bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.</p>
2130 <tr><td class="val" id="ft_pixel_mode_gray">FT_PIXEL_MODE_GRAY</td><td class="desc">
2131 <p>An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of ‘gray’ levels is stored in the <code>num_grays</code> field of the <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code> structure (it generally is 256).</p>
2133 <tr><td class="val" id="ft_pixel_mode_gray2">FT_PIXEL_MODE_GRAY2</td><td class="desc">
2134 <p>A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
2136 <tr><td class="val" id="ft_pixel_mode_gray4">FT_PIXEL_MODE_GRAY4</td><td class="desc">
2137 <p>A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p>
2139 <tr><td class="val" id="ft_pixel_mode_lcd">FT_PIXEL_MODE_LCD</td><td class="desc">
2140 <p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD</a></code>.</p>
2142 <tr><td class="val" id="ft_pixel_mode_lcd_v">FT_PIXEL_MODE_LCD_V</td><td class="desc">
2143 <p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD_V</a></code>.</p>
2145 <tr><td class="val" id="ft_pixel_mode_bgra">FT_PIXEL_MODE_BGRA</td><td class="desc">
2146 <p>[Since 2.5] An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as ‘00,00,80,80’, not ‘00,00,FF,80’. See also <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_COLOR</a></code>.</p>
2152 <h2 id="ft_glyph_format">FT_Glyph_Format<a class="headerlink" href="#ft_glyph_format" title="Permanent link">¶</a></h2>
2153 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
2154 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Glyph_Format_
2156 <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_none">FT_GLYPH_FORMAT_NONE</a>, 0, 0, 0, 0 ),
2158 <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_composite">FT_GLYPH_FORMAT_COMPOSITE</a>, 'c', 'o', 'm', 'p' ),
2159 <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_bitmap">FT_GLYPH_FORMAT_BITMAP</a>, 'b', 'i', 't', 's' ),
2160 <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_outline">FT_GLYPH_FORMAT_OUTLINE</a>, 'o', 'u', 't', 'l' ),
2161 <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_plotter">FT_GLYPH_FORMAT_PLOTTER</a>, 'p', 'l', 'o', 't' )
2163 } <b>FT_Glyph_Format</b>;
2166 /* these constants are deprecated; use the corresponding */
2167 /* `<b>FT_Glyph_Format</b>` values instead. */
2168 #<span class="keyword">define</span> ft_glyph_format_none <a href="ft2-basic_types.html#ft_glyph_format_none">FT_GLYPH_FORMAT_NONE</a>
2169 #<span class="keyword">define</span> ft_glyph_format_composite <a href="ft2-basic_types.html#ft_glyph_format_composite">FT_GLYPH_FORMAT_COMPOSITE</a>
2170 #<span class="keyword">define</span> ft_glyph_format_bitmap <a href="ft2-basic_types.html#ft_glyph_format_bitmap">FT_GLYPH_FORMAT_BITMAP</a>
2171 #<span class="keyword">define</span> ft_glyph_format_outline <a href="ft2-basic_types.html#ft_glyph_format_outline">FT_GLYPH_FORMAT_OUTLINE</a>
2172 #<span class="keyword">define</span> ft_glyph_format_plotter <a href="ft2-basic_types.html#ft_glyph_format_plotter">FT_GLYPH_FORMAT_PLOTTER</a>
2175 <p>An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.</p>
2178 <table class="fields">
2179 <tr><td class="val" id="ft_glyph_format_none">FT_GLYPH_FORMAT_NONE</td><td class="desc">
2180 <p>The value 0 is reserved.</p>
2182 <tr><td class="val" id="ft_glyph_format_composite">FT_GLYPH_FORMAT_COMPOSITE</td><td class="desc">
2183 <p>The glyph image is a composite of several other images. This format is <em>only</em> used with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_RECURSE</a></code>, and is used to report compound glyphs (like accented characters).</p>
2185 <tr><td class="val" id="ft_glyph_format_bitmap">FT_GLYPH_FORMAT_BITMAP</td><td class="desc">
2186 <p>The glyph image is a bitmap, and can be described as an <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code>. You generally need to access the <code>bitmap</code> field of the <code><a href="ft2-base_interface.html#ft_glyphslotrec">FT_GlyphSlotRec</a></code> structure to read it.</p>
2188 <tr><td class="val" id="ft_glyph_format_outline">FT_GLYPH_FORMAT_OUTLINE</td><td class="desc">
2189 <p>The glyph image is a vectorial outline made of line segments and Bezier arcs; it can be described as an <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>; you generally want to access the <code>outline</code> field of the <code><a href="ft2-base_interface.html#ft_glyphslotrec">FT_GlyphSlotRec</a></code> structure to read it.</p>
2191 <tr><td class="val" id="ft_glyph_format_plotter">FT_GLYPH_FORMAT_PLOTTER</td><td class="desc">
2192 <p>The glyph image is a vectorial path with no inside and outside contours. Some Type 1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>, but FreeType isn't currently capable of rendering them correctly.</p>
2198 <h2 id="ft_image_tag">FT_IMAGE_TAG<a class="headerlink" href="#ft_image_tag" title="Permanent link">¶</a></h2>
2199 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
2200 <div class = "codehilite"><pre><code>#<span class="keyword">ifndef</span> <b>FT_IMAGE_TAG</b>
2201 #<span class="keyword">define</span> <b>FT_IMAGE_TAG</b>( value, _x1, _x2, _x3, _x4 ) \
2202 value = ( ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x1 << 24 ) | \
2203 ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x2 << 16 ) | \
2204 ( (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x3 << 8 ) | \
2205 (<span class="keyword">unsigned</span> <span class="keyword">long</span>)_x4 )
2206 #<span class="keyword">endif</span> /* <b>FT_IMAGE_TAG</b> */
2209 <p>This macro converts four-letter tags to an unsigned long type.</p>
2212 <p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:
2213 <div class="highlight"><pre><span></span><code> #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
2214 </code></pre></div></p>
2215 <p>to get a simple enumeration without assigning special numbers.</p>
2233 <footer class="md-footer">
2235 <div class="md-footer-nav">
2236 <nav class="md-footer-nav__inner md-grid">
2238 <a href="ft2-version.html" title="FreeType Version" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
2239 <div class="md-flex__cell md-flex__cell--shrink">
2240 <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
2242 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
2243 <span class="md-flex__ellipsis">
2244 <span class="md-footer-nav__direction">
2253 <a href="ft2-base_interface.html" title="Base Interface" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
2254 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
2255 <span class="md-flex__ellipsis">
2256 <span class="md-footer-nav__direction">
2262 <div class="md-flex__cell md-flex__cell--shrink">
2263 <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
2270 <div class="md-footer-meta md-typeset">
2271 <div class="md-footer-meta__inner md-grid">
2272 <div class="md-footer-copyright">
2274 <div class="md-footer-copyright__highlight">
2275 Copyright 2020 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
2279 <a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a>
2281 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2282 Material for MkDocs</a>
2291 <script src="assets/javascripts/application.c33a9706.js"></script>
2293 <script>app.initialize({version:"1.1",url:{base:"."}})</script>
2295 <script src="javascripts/extra.js"></script>