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>Outline Processing - 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="#outline-processing" 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">
258 <li class="md-nav__item md-nav__item--nested">
260 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
262 <label class="md-nav__link" for="nav-4">
265 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
266 <label class="md-nav__title" for="nav-4">
269 <ul class="md-nav__list" data-md-scrollfix>
277 <li class="md-nav__item">
278 <a href="ft2-version.html" title="FreeType Version" class="md-nav__link">
289 <li class="md-nav__item">
290 <a href="ft2-basic_types.html" title="Basic Data Types" class="md-nav__link">
301 <li class="md-nav__item">
302 <a href="ft2-base_interface.html" title="Base Interface" class="md-nav__link">
313 <li class="md-nav__item">
314 <a href="ft2-glyph_variants.html" title="Unicode Variation Sequences" class="md-nav__link">
315 Unicode Variation Sequences
325 <li class="md-nav__item">
326 <a href="ft2-color_management.html" title="Glyph Color Management" class="md-nav__link">
327 Glyph Color Management
337 <li class="md-nav__item">
338 <a href="ft2-layer_management.html" title="Glyph Layer Management" class="md-nav__link">
339 Glyph Layer Management
349 <li class="md-nav__item">
350 <a href="ft2-glyph_management.html" title="Glyph Management" class="md-nav__link">
361 <li class="md-nav__item">
362 <a href="ft2-mac_specific.html" title="Mac Specific Interface" class="md-nav__link">
363 Mac Specific Interface
373 <li class="md-nav__item">
374 <a href="ft2-sizes_management.html" title="Size Management" class="md-nav__link">
385 <li class="md-nav__item">
386 <a href="ft2-header_file_macros.html" title="Header File Macros" class="md-nav__link">
402 <li class="md-nav__item md-nav__item--nested">
404 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
406 <label class="md-nav__link" for="nav-5">
409 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
410 <label class="md-nav__title" for="nav-5">
413 <ul class="md-nav__list" data-md-scrollfix>
421 <li class="md-nav__item">
422 <a href="ft2-multiple_masters.html" title="Multiple Masters" class="md-nav__link">
433 <li class="md-nav__item">
434 <a href="ft2-truetype_tables.html" title="TrueType Tables" class="md-nav__link">
445 <li class="md-nav__item">
446 <a href="ft2-type1_tables.html" title="Type 1 Tables" class="md-nav__link">
457 <li class="md-nav__item">
458 <a href="ft2-sfnt_names.html" title="SFNT Names" class="md-nav__link">
469 <li class="md-nav__item">
470 <a href="ft2-bdf_fonts.html" title="BDF and PCF Files" class="md-nav__link">
481 <li class="md-nav__item">
482 <a href="ft2-cid_fonts.html" title="CID Fonts" class="md-nav__link">
493 <li class="md-nav__item">
494 <a href="ft2-pfr_fonts.html" title="PFR Fonts" class="md-nav__link">
505 <li class="md-nav__item">
506 <a href="ft2-winfnt_fonts.html" title="Window FNT Files" class="md-nav__link">
517 <li class="md-nav__item">
518 <a href="ft2-font_formats.html" title="Font Formats" class="md-nav__link">
529 <li class="md-nav__item">
530 <a href="ft2-gasp_table.html" title="Gasp Table" class="md-nav__link">
546 <li class="md-nav__item md-nav__item--nested">
548 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
550 <label class="md-nav__link" for="nav-6">
551 Controlling FreeType Modules
553 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
554 <label class="md-nav__title" for="nav-6">
555 Controlling FreeType Modules
557 <ul class="md-nav__list" data-md-scrollfix>
565 <li class="md-nav__item">
566 <a href="ft2-auto_hinter.html" title="The auto-hinter" class="md-nav__link">
577 <li class="md-nav__item">
578 <a href="ft2-cff_driver.html" title="The CFF driver" class="md-nav__link">
589 <li class="md-nav__item">
590 <a href="ft2-t1_cid_driver.html" title="The Type 1 and CID drivers" class="md-nav__link">
591 The Type 1 and CID drivers
601 <li class="md-nav__item">
602 <a href="ft2-tt_driver.html" title="The TrueType driver" class="md-nav__link">
613 <li class="md-nav__item">
614 <a href="ft2-pcf_driver.html" title="The PCF driver" class="md-nav__link">
625 <li class="md-nav__item">
626 <a href="ft2-properties.html" title="Driver properties" class="md-nav__link">
637 <li class="md-nav__item">
638 <a href="ft2-parameter_tags.html" title="Parameter Tags" class="md-nav__link">
649 <li class="md-nav__item">
650 <a href="ft2-lcd_rendering.html" title="Subpixel Rendering" class="md-nav__link">
666 <li class="md-nav__item md-nav__item--nested">
668 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">
670 <label class="md-nav__link" for="nav-7">
673 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
674 <label class="md-nav__title" for="nav-7">
677 <ul class="md-nav__list" data-md-scrollfix>
685 <li class="md-nav__item">
686 <a href="ft2-cache_subsystem.html" title="Cache Sub-System" class="md-nav__link">
704 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
706 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8" checked>
708 <label class="md-nav__link" for="nav-8">
711 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
712 <label class="md-nav__title" for="nav-8">
715 <ul class="md-nav__list" data-md-scrollfix>
723 <li class="md-nav__item">
724 <a href="ft2-computations.html" title="Computations" class="md-nav__link">
735 <li class="md-nav__item">
736 <a href="ft2-list_processing.html" title="List Processing" class="md-nav__link">
749 <li class="md-nav__item md-nav__item--active">
751 <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
756 <label class="md-nav__link md-nav__link--active" for="__toc">
760 <a href="ft2-outline_processing.html" title="Outline Processing" class="md-nav__link md-nav__link--active">
765 <nav class="md-nav md-nav--secondary">
771 <label class="md-nav__title" for="__toc">Table of contents</label>
772 <ul class="md-nav__list" data-md-scrollfix>
774 <li class="md-nav__item">
775 <a href="#synopsis" class="md-nav__link">
781 <li class="md-nav__item">
782 <a href="#ft_outline" class="md-nav__link">
788 <li class="md-nav__item">
789 <a href="#ft_outline_new" class="md-nav__link">
795 <li class="md-nav__item">
796 <a href="#ft_outline_done" class="md-nav__link">
802 <li class="md-nav__item">
803 <a href="#ft_outline_copy" class="md-nav__link">
809 <li class="md-nav__item">
810 <a href="#ft_outline_translate" class="md-nav__link">
816 <li class="md-nav__item">
817 <a href="#ft_outline_transform" class="md-nav__link">
823 <li class="md-nav__item">
824 <a href="#ft_outline_embolden" class="md-nav__link">
830 <li class="md-nav__item">
831 <a href="#ft_outline_emboldenxy" class="md-nav__link">
832 FT_Outline_EmboldenXY
837 <li class="md-nav__item">
838 <a href="#ft_outline_reverse" class="md-nav__link">
844 <li class="md-nav__item">
845 <a href="#ft_outline_check" class="md-nav__link">
851 <li class="md-nav__item">
852 <a href="#ft_outline_get_cbox" class="md-nav__link">
858 <li class="md-nav__item">
859 <a href="#ft_outline_get_bbox" class="md-nav__link">
865 <li class="md-nav__item">
866 <a href="#ft_outline_get_bitmap" class="md-nav__link">
867 FT_Outline_Get_Bitmap
872 <li class="md-nav__item">
873 <a href="#ft_outline_render" class="md-nav__link">
879 <li class="md-nav__item">
880 <a href="#ft_outline_decompose" class="md-nav__link">
886 <li class="md-nav__item">
887 <a href="#ft_outline_funcs" class="md-nav__link">
893 <li class="md-nav__item">
894 <a href="#ft_outline_movetofunc" class="md-nav__link">
895 FT_Outline_MoveToFunc
900 <li class="md-nav__item">
901 <a href="#ft_outline_linetofunc" class="md-nav__link">
902 FT_Outline_LineToFunc
907 <li class="md-nav__item">
908 <a href="#ft_outline_conictofunc" class="md-nav__link">
909 FT_Outline_ConicToFunc
914 <li class="md-nav__item">
915 <a href="#ft_outline_cubictofunc" class="md-nav__link">
916 FT_Outline_CubicToFunc
921 <li class="md-nav__item">
922 <a href="#ft_orientation" class="md-nav__link">
928 <li class="md-nav__item">
929 <a href="#ft_outline_get_orientation" class="md-nav__link">
930 FT_Outline_Get_Orientation
935 <li class="md-nav__item">
936 <a href="#ft_outline_xxx" class="md-nav__link">
958 <li class="md-nav__item">
959 <a href="ft2-quick_advance.html" title="Quick retrieval of advance values" class="md-nav__link">
960 Quick retrieval of advance values
970 <li class="md-nav__item">
971 <a href="ft2-bitmap_handling.html" title="Bitmap Handling" class="md-nav__link">
982 <li class="md-nav__item">
983 <a href="ft2-raster.html" title="Scanline Converter" class="md-nav__link">
994 <li class="md-nav__item">
995 <a href="ft2-glyph_stroker.html" title="Glyph Stroker" class="md-nav__link">
1006 <li class="md-nav__item">
1007 <a href="ft2-system_interface.html" title="System Interface" class="md-nav__link">
1018 <li class="md-nav__item">
1019 <a href="ft2-module_management.html" title="Module Management" class="md-nav__link">
1030 <li class="md-nav__item">
1031 <a href="ft2-gzip.html" title="GZIP Streams" class="md-nav__link">
1042 <li class="md-nav__item">
1043 <a href="ft2-lzw.html" title="LZW Streams" class="md-nav__link">
1054 <li class="md-nav__item">
1055 <a href="ft2-bzip2.html" title="BZIP2 Streams" class="md-nav__link">
1071 <li class="md-nav__item md-nav__item--nested">
1073 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9">
1075 <label class="md-nav__link" for="nav-9">
1078 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1079 <label class="md-nav__title" for="nav-9">
1082 <ul class="md-nav__list" data-md-scrollfix>
1090 <li class="md-nav__item">
1091 <a href="ft2-error_enumerations.html" title="Error Enumerations" class="md-nav__link">
1102 <li class="md-nav__item">
1103 <a href="ft2-error_code_values.html" title="Error Code Values" class="md-nav__link">
1119 <li class="md-nav__item md-nav__item--nested">
1121 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
1123 <label class="md-nav__link" for="nav-10">
1126 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1127 <label class="md-nav__title" for="nav-10">
1130 <ul class="md-nav__list" data-md-scrollfix>
1138 <li class="md-nav__item">
1139 <a href="ft2-gx_validation.html" title="TrueTypeGX/AAT Validation" class="md-nav__link">
1140 TrueTypeGX/AAT Validation
1150 <li class="md-nav__item">
1151 <a href="ft2-incremental.html" title="Incremental Loading" class="md-nav__link">
1162 <li class="md-nav__item">
1163 <a href="ft2-truetype_engine.html" title="The TrueType Engine" class="md-nav__link">
1174 <li class="md-nav__item">
1175 <a href="ft2-ot_validation.html" title="OpenType Validation" class="md-nav__link">
1193 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
1194 <div class="md-sidebar__scrollwrap">
1195 <div class="md-sidebar__inner">
1197 <nav class="md-nav md-nav--secondary">
1203 <label class="md-nav__title" for="__toc">Table of contents</label>
1204 <ul class="md-nav__list" data-md-scrollfix>
1206 <li class="md-nav__item">
1207 <a href="#synopsis" class="md-nav__link">
1213 <li class="md-nav__item">
1214 <a href="#ft_outline" class="md-nav__link">
1220 <li class="md-nav__item">
1221 <a href="#ft_outline_new" class="md-nav__link">
1227 <li class="md-nav__item">
1228 <a href="#ft_outline_done" class="md-nav__link">
1234 <li class="md-nav__item">
1235 <a href="#ft_outline_copy" class="md-nav__link">
1241 <li class="md-nav__item">
1242 <a href="#ft_outline_translate" class="md-nav__link">
1243 FT_Outline_Translate
1248 <li class="md-nav__item">
1249 <a href="#ft_outline_transform" class="md-nav__link">
1250 FT_Outline_Transform
1255 <li class="md-nav__item">
1256 <a href="#ft_outline_embolden" class="md-nav__link">
1262 <li class="md-nav__item">
1263 <a href="#ft_outline_emboldenxy" class="md-nav__link">
1264 FT_Outline_EmboldenXY
1269 <li class="md-nav__item">
1270 <a href="#ft_outline_reverse" class="md-nav__link">
1276 <li class="md-nav__item">
1277 <a href="#ft_outline_check" class="md-nav__link">
1283 <li class="md-nav__item">
1284 <a href="#ft_outline_get_cbox" class="md-nav__link">
1290 <li class="md-nav__item">
1291 <a href="#ft_outline_get_bbox" class="md-nav__link">
1297 <li class="md-nav__item">
1298 <a href="#ft_outline_get_bitmap" class="md-nav__link">
1299 FT_Outline_Get_Bitmap
1304 <li class="md-nav__item">
1305 <a href="#ft_outline_render" class="md-nav__link">
1311 <li class="md-nav__item">
1312 <a href="#ft_outline_decompose" class="md-nav__link">
1313 FT_Outline_Decompose
1318 <li class="md-nav__item">
1319 <a href="#ft_outline_funcs" class="md-nav__link">
1325 <li class="md-nav__item">
1326 <a href="#ft_outline_movetofunc" class="md-nav__link">
1327 FT_Outline_MoveToFunc
1332 <li class="md-nav__item">
1333 <a href="#ft_outline_linetofunc" class="md-nav__link">
1334 FT_Outline_LineToFunc
1339 <li class="md-nav__item">
1340 <a href="#ft_outline_conictofunc" class="md-nav__link">
1341 FT_Outline_ConicToFunc
1346 <li class="md-nav__item">
1347 <a href="#ft_outline_cubictofunc" class="md-nav__link">
1348 FT_Outline_CubicToFunc
1353 <li class="md-nav__item">
1354 <a href="#ft_orientation" class="md-nav__link">
1360 <li class="md-nav__item">
1361 <a href="#ft_outline_get_orientation" class="md-nav__link">
1362 FT_Outline_Get_Orientation
1367 <li class="md-nav__item">
1368 <a href="#ft_outline_xxx" class="md-nav__link">
1386 <div class="md-content">
1387 <article class="md-content__inner md-typeset">
1391 <p><a href="https://www.freetype.org">FreeType</a> » <a href="../">Docs</a> » <a href="index.html#support-api">Support API</a> » Outline Processing</p>
1393 <h1 id="outline-processing">Outline Processing<a class="headerlink" href="#outline-processing" title="Permanent link">¶</a></h1>
1394 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">¶</a></h2>
1395 <p>This section contains routines used to create and destroy scalable glyph images known as ‘outlines’. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>
1396 <h2 id="ft_outline">FT_Outline<a class="headerlink" href="#ft_outline" title="Permanent link">¶</a></h2>
1397 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1398 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_
1400 <span class="keyword">short</span> n_contours; /* number of contours in glyph */
1401 <span class="keyword">short</span> n_points; /* number of points in the glyph */
1403 <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* points; /* the outline's points */
1404 <span class="keyword">char</span>* tags; /* the points flags */
1405 <span class="keyword">short</span>* contours; /* the contour end points */
1407 <span class="keyword">int</span> flags; /* outline masks */
1409 } <b>FT_Outline</b>;
1412 <p>This structure is used to describe an outline to the scan-line converter.</p>
1415 <table class="fields">
1416 <tr><td class="val" id="n_contours">n_contours</td><td class="desc">
1417 <p>The number of contours in the outline.</p>
1419 <tr><td class="val" id="n_points">n_points</td><td class="desc">
1420 <p>The number of points in the outline.</p>
1422 <tr><td class="val" id="points">points</td><td class="desc">
1423 <p>A pointer to an array of <code>n_points</code> <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> elements, giving the outline's point coordinates.</p>
1425 <tr><td class="val" id="tags">tags</td><td class="desc">
1426 <p>A pointer to an array of <code>n_points</code> chars, giving each outline point's type.</p>
1427 <p>If bit 0 is unset, the point is ‘off’ the curve, i.e., a Bezier control point, while it is ‘on’ if set.</p>
1428 <p>Bit 1 is meaningful for ‘off’ points only. If set, it indicates a third-order Bezier arc control point; and a second-order control point if unset.</p>
1429 <p>If bit 2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the ‘SCANMODE’ instruction).</p>
1430 <p>Bits 3 and 4 are reserved for internal purposes.</p>
1432 <tr><td class="val" id="contours">contours</td><td class="desc">
1433 <p>An array of <code>n_contours</code> shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points ‘0’ to <code>contours[0]</code>, the second one is defined by the points <code>contours[0]+1</code> to <code>contours[1]</code>, etc.</p>
1435 <tr><td class="val" id="flags">flags</td><td class="desc">
1436 <p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_XXX</a></code>.</p>
1442 <p>The B/W rasterizer only checks bit 2 in the <code>tags</code> array for the first point of each contour. The drop-out mode as given with <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code>, <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a></code>, and <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a></code> in <code>flags</code> is then overridden.</p>
1445 <h2 id="ft_outline_new">FT_Outline_New<a class="headerlink" href="#ft_outline_new" title="Permanent link">¶</a></h2>
1446 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1447 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1448 <b>FT_Outline_New</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
1449 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> numPoints,
1450 <a href="ft2-basic_types.html#ft_int">FT_Int</a> numContours,
1451 <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> *anoutline );
1454 <p>Create a new outline of a given size.</p>
1457 <table class="fields">
1458 <tr><td class="val" id="library">library</td><td class="desc">
1459 <p>A handle to the library object from where the outline is allocated. Note however that the new outline will <strong>not</strong> necessarily be <strong>freed</strong>, when destroying the library, by <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code>.</p>
1461 <tr><td class="val" id="numpoints">numPoints</td><td class="desc">
1462 <p>The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).</p>
1464 <tr><td class="val" id="numcontours">numContours</td><td class="desc">
1465 <p>The maximum number of contours within the outline. This value must be in the range 0 to <code>numPoints</code>.</p>
1471 <table class="fields">
1472 <tr><td class="val" id="anoutline">anoutline</td><td class="desc">
1473 <p>A handle to the new outline.</p>
1479 <p>FreeType error code. 0 means success.</p>
1482 <p>The reason why this function takes a <code>library</code> parameter is simply to use the library's memory allocator.</p>
1485 <h2 id="ft_outline_done">FT_Outline_Done<a class="headerlink" href="#ft_outline_done" title="Permanent link">¶</a></h2>
1486 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1487 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1488 <b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
1489 <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
1492 <p>Destroy an outline created with <code><a href="ft2-outline_processing.html#ft_outline_new">FT_Outline_New</a></code>.</p>
1495 <table class="fields">
1496 <tr><td class="val" id="library">library</td><td class="desc">
1497 <p>A handle of the library object used to allocate the outline.</p>
1499 <tr><td class="val" id="outline">outline</td><td class="desc">
1500 <p>A pointer to the outline object to be discarded.</p>
1506 <p>FreeType error code. 0 means success.</p>
1509 <p>If the outline's ‘owner’ field is not set, only the outline descriptor will be released.</p>
1512 <h2 id="ft_outline_copy">FT_Outline_Copy<a class="headerlink" href="#ft_outline_copy" title="Permanent link">¶</a></h2>
1513 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1514 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1515 <b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* source,
1516 <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> *target );
1519 <p>Copy an outline into another one. Both objects must have the same sizes (number of points & number of contours) when this function is called.</p>
1522 <table class="fields">
1523 <tr><td class="val" id="source">source</td><td class="desc">
1524 <p>A handle to the source outline.</p>
1530 <table class="fields">
1531 <tr><td class="val" id="target">target</td><td class="desc">
1532 <p>A handle to the target outline.</p>
1538 <p>FreeType error code. 0 means success.</p>
1541 <h2 id="ft_outline_translate">FT_Outline_Translate<a class="headerlink" href="#ft_outline_translate" title="Permanent link">¶</a></h2>
1542 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1543 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
1544 <b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1545 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xOffset,
1546 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> yOffset );
1549 <p>Apply a simple translation to the points of an outline.</p>
1552 <table class="fields">
1553 <tr><td class="val" id="outline">outline</td><td class="desc">
1554 <p>A pointer to the target outline descriptor.</p>
1560 <table class="fields">
1561 <tr><td class="val" id="xoffset">xOffset</td><td class="desc">
1562 <p>The horizontal offset.</p>
1564 <tr><td class="val" id="yoffset">yOffset</td><td class="desc">
1565 <p>The vertical offset.</p>
1571 <h2 id="ft_outline_transform">FT_Outline_Transform<a class="headerlink" href="#ft_outline_transform" title="Permanent link">¶</a></h2>
1572 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1573 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
1574 <b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1575 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* matrix );
1578 <p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p>
1581 <table class="fields">
1582 <tr><td class="val" id="outline">outline</td><td class="desc">
1583 <p>A pointer to the target outline descriptor.</p>
1589 <table class="fields">
1590 <tr><td class="val" id="matrix">matrix</td><td class="desc">
1591 <p>A pointer to the transformation matrix.</p>
1597 <p>You can use <code><a href="ft2-outline_processing.html#ft_outline_translate">FT_Outline_Translate</a></code> if you need to translate the outline's points.</p>
1600 <h2 id="ft_outline_embolden">FT_Outline_Embolden<a class="headerlink" href="#ft_outline_embolden" title="Permanent link">¶</a></h2>
1601 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1602 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1603 <b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1604 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> strength );
1607 <p>Embolden an outline. The new outline will be at most 4 times <code>strength</code> pixels wider and higher. You may think of the left and bottom borders as unchanged.</p>
1608 <p>Negative <code>strength</code> values to reduce the outline thickness are possible also.</p>
1611 <table class="fields">
1612 <tr><td class="val" id="outline">outline</td><td class="desc">
1613 <p>A handle to the target outline.</p>
1619 <table class="fields">
1620 <tr><td class="val" id="strength">strength</td><td class="desc">
1621 <p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p>
1627 <p>FreeType error code. 0 means success.</p>
1630 <p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p>
1631 <p>If you need ‘better’ metrics values you should call <code><a href="ft2-outline_processing.html#ft_outline_get_cbox">FT_Outline_Get_CBox</a></code> or <code><a href="ft2-outline_processing.html#ft_outline_get_bbox">FT_Outline_Get_BBox</a></code>.</p>
1632 <p>To get meaningful results, font scaling values must be set with functions like <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code> before calling FT_Render_Glyph.</p>
1635 <div class="highlight"><pre><span></span><code> FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
1637 if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
1638 FT_Outline_Embolden( &face->glyph->outline, strength );
1643 <h2 id="ft_outline_emboldenxy">FT_Outline_EmboldenXY<a class="headerlink" href="#ft_outline_emboldenxy" title="Permanent link">¶</a></h2>
1644 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1645 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1646 <b>FT_Outline_EmboldenXY</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1647 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xstrength,
1648 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> ystrength );
1651 <p>Embolden an outline. The new outline will be <code>xstrength</code> pixels wider and <code>ystrength</code> pixels higher. Otherwise, it is similar to <code><a href="ft2-outline_processing.html#ft_outline_embolden">FT_Outline_Embolden</a></code>, which uses the same strength in both directions.</p>
1657 <h2 id="ft_outline_reverse">FT_Outline_Reverse<a class="headerlink" href="#ft_outline_reverse" title="Permanent link">¶</a></h2>
1658 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1659 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
1660 <b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
1663 <p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p>
1666 <table class="fields">
1667 <tr><td class="val" id="outline">outline</td><td class="desc">
1668 <p>A pointer to the target outline descriptor.</p>
1674 <p>This function toggles the bit flag <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_REVERSE_FILL</a></code> in the outline's <code>flags</code> field.</p>
1675 <p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p>
1678 <h2 id="ft_outline_check">FT_Outline_Check<a class="headerlink" href="#ft_outline_check" title="Permanent link">¶</a></h2>
1679 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1680 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1681 <b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
1684 <p>Check the contents of an outline descriptor.</p>
1687 <table class="fields">
1688 <tr><td class="val" id="outline">outline</td><td class="desc">
1689 <p>A handle to a source outline.</p>
1695 <p>FreeType error code. 0 means success.</p>
1698 <p>An empty outline, or an outline with a single point only is also valid.</p>
1701 <h2 id="ft_outline_get_cbox">FT_Outline_Get_CBox<a class="headerlink" href="#ft_outline_get_cbox" title="Permanent link">¶</a></h2>
1702 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1703 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
1704 <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1705 <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *acbox );
1708 <p>Return an outline's ‘control box’. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
1709 <p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the ‘ftbbox’ component, which is dedicated to this single task.</p>
1712 <table class="fields">
1713 <tr><td class="val" id="outline">outline</td><td class="desc">
1714 <p>A pointer to the source outline descriptor.</p>
1720 <table class="fields">
1721 <tr><td class="val" id="acbox">acbox</td><td class="desc">
1722 <p>The outline's control box.</p>
1728 <p>See <code><a href="ft2-glyph_management.html#ft_glyph_get_cbox">FT_Glyph_Get_CBox</a></code> for a discussion of tricky fonts.</p>
1731 <h2 id="ft_outline_get_bbox">FT_Outline_Get_BBox<a class="headerlink" href="#ft_outline_get_bbox" title="Permanent link">¶</a></h2>
1732 <p>Defined in FT_BBOX_H (freetype/ftbbox.h).</p>
1733 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1734 <b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1735 <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *abbox );
1738 <p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <em>very</em> quickly when the two boxes coincide. Otherwise, the outline Bezier arcs are traversed to extract their extrema.</p>
1741 <table class="fields">
1742 <tr><td class="val" id="outline">outline</td><td class="desc">
1743 <p>A pointer to the source outline.</p>
1749 <table class="fields">
1750 <tr><td class="val" id="abbox">abbox</td><td class="desc">
1751 <p>The outline's exact bounding box.</p>
1757 <p>FreeType error code. 0 means success.</p>
1760 <p>If the font is tricky and the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, the resulting BBox is meaningless. To get reasonable values for the BBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the BBox, which can be eventually converted back to font units.</p>
1763 <h2 id="ft_outline_get_bitmap">FT_Outline_Get_Bitmap<a class="headerlink" href="#ft_outline_get_bitmap" title="Permanent link">¶</a></h2>
1764 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1765 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1766 <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
1767 <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1768 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *abitmap );
1771 <p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>
1774 <table class="fields">
1775 <tr><td class="val" id="library">library</td><td class="desc">
1776 <p>A handle to a FreeType library object.</p>
1778 <tr><td class="val" id="outline">outline</td><td class="desc">
1779 <p>A pointer to the source outline descriptor.</p>
1785 <table class="fields">
1786 <tr><td class="val" id="abitmap">abitmap</td><td class="desc">
1787 <p>A pointer to the target bitmap descriptor.</p>
1793 <p>FreeType error code. 0 means success.</p>
1796 <p>This function does <strong>not create</strong> the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in <code>abitmap</code> should be set accordingly.</p>
1797 <p>It will use the raster corresponding to the default glyph format.</p>
1798 <p>The value of the <code>num_grays</code> field in <code>abitmap</code> is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <code><a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a></code> directly.</p>
1801 <h2 id="ft_outline_render">FT_Outline_Render<a class="headerlink" href="#ft_outline_render" title="Permanent link">¶</a></h2>
1802 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1803 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1804 <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library,
1805 <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1806 <a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a>* params );
1809 <p>Render an outline within a bitmap using the current scan-convert.</p>
1812 <table class="fields">
1813 <tr><td class="val" id="library">library</td><td class="desc">
1814 <p>A handle to a FreeType library object.</p>
1816 <tr><td class="val" id="outline">outline</td><td class="desc">
1817 <p>A pointer to the source outline descriptor.</p>
1823 <table class="fields">
1824 <tr><td class="val" id="params">params</td><td class="desc">
1825 <p>A pointer to an <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> structure used to describe the rendering operation.</p>
1831 <p>FreeType error code. 0 means success.</p>
1834 <p>This advanced function uses <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> as an argument. The field <code>params.source</code> will be set to <code>outline</code> before the scan converter is called, which means that the value you give to it is actually ignored. Either <code>params.target</code> must point to preallocated bitmap, or <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DIRECT</a></code> must be set in <code>params.flags</code> allowing FreeType rasterizer to be used for direct composition, translucency, etc. See <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> for more details.</p>
1837 <h2 id="ft_outline_decompose">FT_Outline_Decompose<a class="headerlink" href="#ft_outline_decompose" title="Permanent link">¶</a></h2>
1838 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
1839 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1840 <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline,
1841 <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline_funcs">FT_Outline_Funcs</a>* func_interface,
1842 <span class="keyword">void</span>* user );
1845 <p>Walk over an outline's structure to decompose it into individual segments and Bezier arcs. This function also emits ‘move to’ operations to indicate the start of new contours in the outline.</p>
1848 <table class="fields">
1849 <tr><td class="val" id="outline">outline</td><td class="desc">
1850 <p>A pointer to the source target.</p>
1852 <tr><td class="val" id="func_interface">func_interface</td><td class="desc">
1853 <p>A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.</p>
1859 <table class="fields">
1860 <tr><td class="val" id="user">user</td><td class="desc">
1861 <p>A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
1867 <p>FreeType error code. 0 means success.</p>
1870 <p>A contour that contains a single point only is represented by a ‘move to’ operation followed by ‘line to’ to the same point. In most cases, it is best to filter this out before using the outline for stroking purposes (otherwise it would result in a visible dot when round caps are used).</p>
1871 <p>Similarly, the function returns success for an empty outline also (doing nothing, this is, not calling any emitter); if necessary, you should filter this out, too.</p>
1874 <h2 id="ft_outline_funcs">FT_Outline_Funcs<a class="headerlink" href="#ft_outline_funcs" title="Permanent link">¶</a></h2>
1875 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1876 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_Funcs_
1878 <a href="ft2-outline_processing.html#ft_outline_movetofunc">FT_Outline_MoveToFunc</a> move_to;
1879 <a href="ft2-outline_processing.html#ft_outline_linetofunc">FT_Outline_LineToFunc</a> line_to;
1880 <a href="ft2-outline_processing.html#ft_outline_conictofunc">FT_Outline_ConicToFunc</a> conic_to;
1881 <a href="ft2-outline_processing.html#ft_outline_cubictofunc">FT_Outline_CubicToFunc</a> cubic_to;
1883 <span class="keyword">int</span> shift;
1884 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> delta;
1886 } <b>FT_Outline_Funcs</b>;
1889 <p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers.</p>
1892 <table class="fields">
1893 <tr><td class="val" id="move_to">move_to</td><td class="desc">
1894 <p>The ‘move to’ emitter.</p>
1896 <tr><td class="val" id="line_to">line_to</td><td class="desc">
1897 <p>The segment emitter.</p>
1899 <tr><td class="val" id="conic_to">conic_to</td><td class="desc">
1900 <p>The second-order Bezier arc emitter.</p>
1902 <tr><td class="val" id="cubic_to">cubic_to</td><td class="desc">
1903 <p>The third-order Bezier arc emitter.</p>
1905 <tr><td class="val" id="shift">shift</td><td class="desc">
1906 <p>The shift that is applied to coordinates before they are sent to the emitter.</p>
1908 <tr><td class="val" id="delta">delta</td><td class="desc">
1909 <p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
1915 <p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:
1916 <div class="highlight"><pre><span></span><code> x' = (x << shift) - delta
1917 y' = (y << shift) - delta
1918 </code></pre></div></p>
1919 <p>Set the values of <code>shift</code> and <code>delta</code> to 0 to get the original point coordinates.</p>
1922 <h2 id="ft_outline_movetofunc">FT_Outline_MoveToFunc<a class="headerlink" href="#ft_outline_movetofunc" title="Permanent link">¶</a></h2>
1923 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1924 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
1925 (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
1926 <span class="keyword">void</span>* user );
1928 #<span class="keyword">define</span> FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b>
1931 <p>A function pointer type used to describe the signature of a ‘move to’ function during outline walking/decomposition.</p>
1932 <p>A ‘move to’ is emitted to start a new contour in an outline.</p>
1935 <table class="fields">
1936 <tr><td class="val" id="to">to</td><td class="desc">
1937 <p>A pointer to the target point of the ‘move to’.</p>
1939 <tr><td class="val" id="user">user</td><td class="desc">
1940 <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
1946 <p>Error code. 0 means success.</p>
1949 <h2 id="ft_outline_linetofunc">FT_Outline_LineToFunc<a class="headerlink" href="#ft_outline_linetofunc" title="Permanent link">¶</a></h2>
1950 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1951 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
1952 (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
1953 <span class="keyword">void</span>* user );
1955 #<span class="keyword">define</span> FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b>
1958 <p>A function pointer type used to describe the signature of a ‘line to’ function during outline walking/decomposition.</p>
1959 <p>A ‘line to’ is emitted to indicate a segment in the outline.</p>
1962 <table class="fields">
1963 <tr><td class="val" id="to">to</td><td class="desc">
1964 <p>A pointer to the target point of the ‘line to’.</p>
1966 <tr><td class="val" id="user">user</td><td class="desc">
1967 <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
1973 <p>Error code. 0 means success.</p>
1976 <h2 id="ft_outline_conictofunc">FT_Outline_ConicToFunc<a class="headerlink" href="#ft_outline_conictofunc" title="Permanent link">¶</a></h2>
1977 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
1978 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
1979 (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control,
1980 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
1981 <span class="keyword">void</span>* user );
1983 #<span class="keyword">define</span> FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b>
1986 <p>A function pointer type used to describe the signature of a ‘conic to’ function during outline walking or decomposition.</p>
1987 <p>A ‘conic to’ is emitted to indicate a second-order Bezier arc in the outline.</p>
1990 <table class="fields">
1991 <tr><td class="val" id="control">control</td><td class="desc">
1992 <p>An intermediate control point between the last position and the new target in <code>to</code>.</p>
1994 <tr><td class="val" id="to">to</td><td class="desc">
1995 <p>A pointer to the target end point of the conic arc.</p>
1997 <tr><td class="val" id="user">user</td><td class="desc">
1998 <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
2004 <p>Error code. 0 means success.</p>
2007 <h2 id="ft_outline_cubictofunc">FT_Outline_CubicToFunc<a class="headerlink" href="#ft_outline_cubictofunc" title="Permanent link">¶</a></h2>
2008 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
2009 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span>
2010 (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control1,
2011 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control2,
2012 <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to,
2013 <span class="keyword">void</span>* user );
2015 #<span class="keyword">define</span> FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b>
2018 <p>A function pointer type used to describe the signature of a ‘cubic to’ function during outline walking or decomposition.</p>
2019 <p>A ‘cubic to’ is emitted to indicate a third-order Bezier arc.</p>
2022 <table class="fields">
2023 <tr><td class="val" id="control1">control1</td><td class="desc">
2024 <p>A pointer to the first Bezier control point.</p>
2026 <tr><td class="val" id="control2">control2</td><td class="desc">
2027 <p>A pointer to the second Bezier control point.</p>
2029 <tr><td class="val" id="to">to</td><td class="desc">
2030 <p>A pointer to the target end point.</p>
2032 <tr><td class="val" id="user">user</td><td class="desc">
2033 <p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
2039 <p>Error code. 0 means success.</p>
2042 <h2 id="ft_orientation">FT_Orientation<a class="headerlink" href="#ft_orientation" title="Permanent link">¶</a></h2>
2043 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
2044 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Orientation_
2046 <a href="ft2-outline_processing.html#ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</a> = 0,
2047 <a href="ft2-outline_processing.html#ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</a> = 1,
2048 <a href="ft2-outline_processing.html#ft_orientation_fill_right">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</a>,
2049 <a href="ft2-outline_processing.html#ft_orientation_fill_left">FT_ORIENTATION_FILL_LEFT</a> = <a href="ft2-outline_processing.html#ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</a>,
2050 <a href="ft2-outline_processing.html#ft_orientation_none">FT_ORIENTATION_NONE</a>
2052 } <b>FT_Orientation</b>;
2055 <p>A list of values used to describe an outline's contour orientation.</p>
2056 <p>The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p>
2059 <table class="fields">
2060 <tr><td class="val" id="ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</td><td class="desc">
2061 <p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p>
2063 <tr><td class="val" id="ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</td><td class="desc">
2064 <p>According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p>
2066 <tr><td class="val" id="ft_orientation_fill_right">FT_ORIENTATION_FILL_RIGHT</td><td class="desc">
2067 <p>This is identical to <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p>
2069 <tr><td class="val" id="ft_orientation_fill_left">FT_ORIENTATION_FILL_LEFT</td><td class="desc">
2070 <p>This is identical to <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a></code>, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.</p>
2072 <tr><td class="val" id="ft_orientation_none">FT_ORIENTATION_NONE</td><td class="desc">
2073 <p>The orientation cannot be determined. That is, different parts of the glyph have different orientation.</p>
2079 <h2 id="ft_outline_get_orientation">FT_Outline_Get_Orientation<a class="headerlink" href="#ft_outline_get_orientation" title="Permanent link">¶</a></h2>
2080 <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
2081 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a> )
2082 <b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline );
2085 <p>This function analyzes a glyph outline and tries to compute its fill orientation (see <code><a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a></code>). This is done by integrating the total area covered by the outline. The positive integral corresponds to the clockwise orientation and <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a></code> is returned. The negative integral corresponds to the counter-clockwise orientation and <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code> is returned.</p>
2086 <p>Note that this will return <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code> for empty outlines.</p>
2089 <table class="fields">
2090 <tr><td class="val" id="outline">outline</td><td class="desc">
2091 <p>A handle to the source outline.</p>
2097 <p>The orientation.</p>
2100 <h2 id="ft_outline_xxx">FT_OUTLINE_XXX<a class="headerlink" href="#ft_outline_xxx" title="Permanent link">¶</a></h2>
2101 <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
2102 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_none">FT_OUTLINE_NONE</a> 0x0
2103 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_owner">FT_OUTLINE_OWNER</a> 0x1
2104 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2
2105 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</a> 0x4
2106 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8
2107 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_smart_dropouts">FT_OUTLINE_SMART_DROPOUTS</a> 0x10
2108 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_include_stubs">FT_OUTLINE_INCLUDE_STUBS</a> 0x20
2109 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_overlap">FT_OUTLINE_OVERLAP</a> 0x40
2111 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</a> 0x100
2112 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</a> 0x200
2115 /* these constants are deprecated; use the corresponding */
2116 /* `<b>FT_OUTLINE_XXX</b>` values instead */
2117 #<span class="keyword">define</span> ft_outline_none <a href="ft2-outline_processing.html#ft_outline_none">FT_OUTLINE_NONE</a>
2118 #<span class="keyword">define</span> ft_outline_owner <a href="ft2-outline_processing.html#ft_outline_owner">FT_OUTLINE_OWNER</a>
2119 #<span class="keyword">define</span> ft_outline_even_odd_fill <a href="ft2-outline_processing.html#ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</a>
2120 #<span class="keyword">define</span> ft_outline_reverse_fill <a href="ft2-outline_processing.html#ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</a>
2121 #<span class="keyword">define</span> ft_outline_ignore_dropouts <a href="ft2-outline_processing.html#ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</a>
2122 #<span class="keyword">define</span> ft_outline_high_precision <a href="ft2-outline_processing.html#ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</a>
2123 #<span class="keyword">define</span> ft_outline_single_pass <a href="ft2-outline_processing.html#ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</a>
2126 <p>A list of bit-field constants used for the flags in an outline's <code>flags</code> field.</p>
2129 <table class="fields long">
2130 <tr><td class="val" id="ft_outline_none">FT_OUTLINE_NONE</td><td class="desc">
2131 <p>Value 0 is reserved.</p>
2133 <tr><td class="val" id="ft_outline_owner">FT_OUTLINE_OWNER</td><td class="desc">
2134 <p>If set, this flag indicates that the outline's field arrays (i.e., <code>points</code>, <code>flags</code>, and <code>contours</code>) are ‘owned’ by the outline object, and should thus be freed when it is destroyed.</p>
2136 <tr><td class="val" id="ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</td><td class="desc">
2137 <p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
2139 <tr><td class="val" id="ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</td><td class="desc">
2140 <p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type 1 fonts). This flag is ignored by the scan converter.</p>
2142 <tr><td class="val" id="ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</td><td class="desc">
2143 <p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
2145 <tr><td class="val" id="ft_outline_smart_dropouts">FT_OUTLINE_SMART_DROPOUTS</td><td class="desc">
2146 <p>Select smart dropout control. If unset, use simple dropout control. Ignored if <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code> is set. See below for more information.</p>
2148 <tr><td class="val" id="ft_outline_include_stubs">FT_OUTLINE_INCLUDE_STUBS</td><td class="desc">
2149 <p>If set, turn pixels on for ‘stubs’, otherwise exclude them. Ignored if <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code> is set. See below for more information.</p>
2151 <tr><td class="val" id="ft_outline_overlap">FT_OUTLINE_OVERLAP</td><td class="desc">
2152 <p>This flag indicates that this outline contains overlapping contrours and the anti-aliased renderer should perform oversampling to mitigate possible artifacts. This flag should <em>not</em> be set for well designed glyphs without overlaps because it quadruples the rendering time.</p>
2154 <tr><td class="val" id="ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</td><td class="desc">
2155 <p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
2157 <tr><td class="val" id="ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</td><td class="desc">
2158 <p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
2164 <p>The flags <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code>, <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a></code>, and <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a></code> are ignored by the smooth rasterizer.</p>
2165 <p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the <code>tags</code> field in <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>.</p>
2166 <p>Please refer to the description of the ‘SCANTYPE’ instruction in the OpenType specification (in file <code>ttinst1.doc</code>) how simple drop-outs, smart drop-outs, and stubs are defined.</p>
2184 <footer class="md-footer">
2186 <div class="md-footer-nav">
2187 <nav class="md-footer-nav__inner md-grid">
2189 <a href="ft2-list_processing.html" title="List Processing" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
2190 <div class="md-flex__cell md-flex__cell--shrink">
2191 <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
2193 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
2194 <span class="md-flex__ellipsis">
2195 <span class="md-footer-nav__direction">
2204 <a href="ft2-quick_advance.html" title="Quick retrieval of advance values" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
2205 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
2206 <span class="md-flex__ellipsis">
2207 <span class="md-footer-nav__direction">
2210 Quick retrieval of advance values
2213 <div class="md-flex__cell md-flex__cell--shrink">
2214 <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
2221 <div class="md-footer-meta md-typeset">
2222 <div class="md-footer-meta__inner md-grid">
2223 <div class="md-footer-copyright">
2225 <div class="md-footer-copyright__highlight">
2226 Copyright 2020 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
2230 <a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a>
2232 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2233 Material for MkDocs</a>
2242 <script src="assets/javascripts/application.c33a9706.js"></script>
2244 <script>app.initialize({version:"1.1",url:{base:"."}})</script>
2246 <script src="javascripts/extra.js"></script>