1 2 3 4 5<!doctype html> 6<html lang="en" class="no-js"> 7 <head> 8 9 <meta charset="utf-8"> 10 <meta name="viewport" content="width=device-width,initial-scale=1"> 11 <meta http-equiv="x-ua-compatible" content="ie=edge"> 12 13 <meta name="description" content="API Reference Documentation for FreeType-2.10.4"> 14 15 16 17 <meta name="author" content="FreeType Contributors"> 18 19 20 <meta name="lang:clipboard.copy" content="Copy to clipboard"> 21 22 <meta name="lang:clipboard.copied" content="Copied to clipboard"> 23 24 <meta name="lang:search.language" content="en"> 25 26 <meta name="lang:search.pipeline.stopwords" content="True"> 27 28 <meta name="lang:search.pipeline.trimmer" content="True"> 29 30 <meta name="lang:search.result.none" content="No matching documents"> 31 32 <meta name="lang:search.result.one" content="1 matching document"> 33 34 <meta name="lang:search.result.other" content="# matching documents"> 35 36 <meta name="lang:search.tokenizer" content="[\s\-]+"> 37 38 <link rel="shortcut icon" href="images/favico.ico"> 39 <meta name="generator" content="mkdocs-1.1, mkdocs-material-4.6.3"> 40 41 42 43 <title>Outline Processing - FreeType-2.10.4 API Reference</title> 44 45 46 47 <link rel="stylesheet" href="assets/stylesheets/application.adb8469c.css"> 48 49 <link rel="stylesheet" href="assets/stylesheets/application-palette.a8b3c06d.css"> 50 51 52 53 54 <meta name="theme-color" content="#4caf50"> 55 56 57 58 <script src="assets/javascripts/modernizr.86422ebf.js"></script> 59 60 61 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> 65 66 67 <link rel="stylesheet" href="assets/fonts/material-icons.css"> 68 69 70 <link rel="stylesheet" href="stylesheets/extra.css"> 71 72 73 74 75 76 </head> 77 78 79 80 <body dir="ltr" data-md-color-primary="green" data-md-color-accent="green"> 81 82 <svg class="md-svg"> 83 <defs> 84 85 86 </defs> 87 </svg> 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> 91 92 <a href="#outline-processing" tabindex="0" class="md-skip"> 93 Skip to content 94 </a> 95 96 97 <header class="md-header" data-md-component="header"> 98 <nav class="md-header-nav md-grid"> 99 <div class="md-flex"> 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"> 102 103 <img alt="logo" src="images/favico.ico" width="24" height="24"> 104 105 </a> 106 </div> 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> 109 </div> 110 <div class="md-flex__cell md-flex__cell--stretch"> 111 <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title"> 112 113 <span class="md-header-nav__topic"> 114 FreeType-2.10.4 API Reference 115 </span> 116 <span class="md-header-nav__topic"> 117 118 Outline Processing 119 120 </span> 121 122 </div> 123 </div> 124 <div class="md-flex__cell md-flex__cell--shrink"> 125 126 <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label> 127 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"> 135  136 </button> 137 </form> 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 143 </div> 144 <ol class="md-search-result__list"></ol> 145 </div> 146 </div> 147 </div> 148 </div> 149</div> 150 151 </div> 152 153 </div> 154 </nav> 155</header> 156 157 <div class="md-container"> 158 159 160 161 162 <main class="md-main" role="main"> 163 <div class="md-main__inner md-grid" data-md-component="container"> 164 165 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"> 172 173 <img alt="logo" src="images/favico.ico" width="48" height="48"> 174 175 </a> 176 FreeType-2.10.4 API Reference 177 </label> 178 179 <ul class="md-nav__list" data-md-scrollfix> 180 181 182 183 184 185 186 <li class="md-nav__item"> 187 <a href="index.html" title="TOC" class="md-nav__link"> 188 TOC 189 </a> 190 </li> 191 192 193 194 195 196 197 198 <li class="md-nav__item"> 199 <a href="ft2-index.html" title="Index" class="md-nav__link"> 200 Index 201 </a> 202 </li> 203 204 205 206 207 208 209 210 <li class="md-nav__item md-nav__item--nested"> 211 212 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3"> 213 214 <label class="md-nav__link" for="nav-3"> 215 General Remarks 216 </label> 217 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 218 <label class="md-nav__title" for="nav-3"> 219 General Remarks 220 </label> 221 <ul class="md-nav__list" data-md-scrollfix> 222 223 224 225 226 227 228 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 232 </a> 233 </li> 234 235 236 237 238 239 240 241 <li class="md-nav__item"> 242 <a href="ft2-user_allocation.html" title="User allocation" class="md-nav__link"> 243 User allocation 244 </a> 245 </li> 246 247 248 </ul> 249 </nav> 250 </li> 251 252 253 254 255 256 257 258 <li class="md-nav__item md-nav__item--nested"> 259 260 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4"> 261 262 <label class="md-nav__link" for="nav-4"> 263 Core API 264 </label> 265 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 266 <label class="md-nav__title" for="nav-4"> 267 Core API 268 </label> 269 <ul class="md-nav__list" data-md-scrollfix> 270 271 272 273 274 275 276 277 <li class="md-nav__item"> 278 <a href="ft2-version.html" title="FreeType Version" class="md-nav__link"> 279 FreeType Version 280 </a> 281 </li> 282 283 284 285 286 287 288 289 <li class="md-nav__item"> 290 <a href="ft2-basic_types.html" title="Basic Data Types" class="md-nav__link"> 291 Basic Data Types 292 </a> 293 </li> 294 295 296 297 298 299 300 301 <li class="md-nav__item"> 302 <a href="ft2-base_interface.html" title="Base Interface" class="md-nav__link"> 303 Base Interface 304 </a> 305 </li> 306 307 308 309 310 311 312 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 316 </a> 317 </li> 318 319 320 321 322 323 324 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 328 </a> 329 </li> 330 331 332 333 334 335 336 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 340 </a> 341 </li> 342 343 344 345 346 347 348 349 <li class="md-nav__item"> 350 <a href="ft2-glyph_management.html" title="Glyph Management" class="md-nav__link"> 351 Glyph Management 352 </a> 353 </li> 354 355 356 357 358 359 360 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 364 </a> 365 </li> 366 367 368 369 370 371 372 373 <li class="md-nav__item"> 374 <a href="ft2-sizes_management.html" title="Size Management" class="md-nav__link"> 375 Size Management 376 </a> 377 </li> 378 379 380 381 382 383 384 385 <li class="md-nav__item"> 386 <a href="ft2-header_file_macros.html" title="Header File Macros" class="md-nav__link"> 387 Header File Macros 388 </a> 389 </li> 390 391 392 </ul> 393 </nav> 394 </li> 395 396 397 398 399 400 401 402 <li class="md-nav__item md-nav__item--nested"> 403 404 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5"> 405 406 <label class="md-nav__link" for="nav-5"> 407 Format-Specific API 408 </label> 409 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 410 <label class="md-nav__title" for="nav-5"> 411 Format-Specific API 412 </label> 413 <ul class="md-nav__list" data-md-scrollfix> 414 415 416 417 418 419 420 421 <li class="md-nav__item"> 422 <a href="ft2-multiple_masters.html" title="Multiple Masters" class="md-nav__link"> 423 Multiple Masters 424 </a> 425 </li> 426 427 428 429 430 431 432 433 <li class="md-nav__item"> 434 <a href="ft2-truetype_tables.html" title="TrueType Tables" class="md-nav__link"> 435 TrueType Tables 436 </a> 437 </li> 438 439 440 441 442 443 444 445 <li class="md-nav__item"> 446 <a href="ft2-type1_tables.html" title="Type 1 Tables" class="md-nav__link"> 447 Type 1 Tables 448 </a> 449 </li> 450 451 452 453 454 455 456 457 <li class="md-nav__item"> 458 <a href="ft2-sfnt_names.html" title="SFNT Names" class="md-nav__link"> 459 SFNT Names 460 </a> 461 </li> 462 463 464 465 466 467 468 469 <li class="md-nav__item"> 470 <a href="ft2-bdf_fonts.html" title="BDF and PCF Files" class="md-nav__link"> 471 BDF and PCF Files 472 </a> 473 </li> 474 475 476 477 478 479 480 481 <li class="md-nav__item"> 482 <a href="ft2-cid_fonts.html" title="CID Fonts" class="md-nav__link"> 483 CID Fonts 484 </a> 485 </li> 486 487 488 489 490 491 492 493 <li class="md-nav__item"> 494 <a href="ft2-pfr_fonts.html" title="PFR Fonts" class="md-nav__link"> 495 PFR Fonts 496 </a> 497 </li> 498 499 500 501 502 503 504 505 <li class="md-nav__item"> 506 <a href="ft2-winfnt_fonts.html" title="Window FNT Files" class="md-nav__link"> 507 Window FNT Files 508 </a> 509 </li> 510 511 512 513 514 515 516 517 <li class="md-nav__item"> 518 <a href="ft2-font_formats.html" title="Font Formats" class="md-nav__link"> 519 Font Formats 520 </a> 521 </li> 522 523 524 525 526 527 528 529 <li class="md-nav__item"> 530 <a href="ft2-gasp_table.html" title="Gasp Table" class="md-nav__link"> 531 Gasp Table 532 </a> 533 </li> 534 535 536 </ul> 537 </nav> 538 </li> 539 540 541 542 543 544 545 546 <li class="md-nav__item md-nav__item--nested"> 547 548 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6"> 549 550 <label class="md-nav__link" for="nav-6"> 551 Controlling FreeType Modules 552 </label> 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 556 </label> 557 <ul class="md-nav__list" data-md-scrollfix> 558 559 560 561 562 563 564 565 <li class="md-nav__item"> 566 <a href="ft2-auto_hinter.html" title="The auto-hinter" class="md-nav__link"> 567 The auto-hinter 568 </a> 569 </li> 570 571 572 573 574 575 576 577 <li class="md-nav__item"> 578 <a href="ft2-cff_driver.html" title="The CFF driver" class="md-nav__link"> 579 The CFF driver 580 </a> 581 </li> 582 583 584 585 586 587 588 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 592 </a> 593 </li> 594 595 596 597 598 599 600 601 <li class="md-nav__item"> 602 <a href="ft2-tt_driver.html" title="The TrueType driver" class="md-nav__link"> 603 The TrueType driver 604 </a> 605 </li> 606 607 608 609 610 611 612 613 <li class="md-nav__item"> 614 <a href="ft2-pcf_driver.html" title="The PCF driver" class="md-nav__link"> 615 The PCF driver 616 </a> 617 </li> 618 619 620 621 622 623 624 625 <li class="md-nav__item"> 626 <a href="ft2-properties.html" title="Driver properties" class="md-nav__link"> 627 Driver properties 628 </a> 629 </li> 630 631 632 633 634 635 636 637 <li class="md-nav__item"> 638 <a href="ft2-parameter_tags.html" title="Parameter Tags" class="md-nav__link"> 639 Parameter Tags 640 </a> 641 </li> 642 643 644 645 646 647 648 649 <li class="md-nav__item"> 650 <a href="ft2-lcd_rendering.html" title="Subpixel Rendering" class="md-nav__link"> 651 Subpixel Rendering 652 </a> 653 </li> 654 655 656 </ul> 657 </nav> 658 </li> 659 660 661 662 663 664 665 666 <li class="md-nav__item md-nav__item--nested"> 667 668 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7"> 669 670 <label class="md-nav__link" for="nav-7"> 671 Cache Sub-System 672 </label> 673 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 674 <label class="md-nav__title" for="nav-7"> 675 Cache Sub-System 676 </label> 677 <ul class="md-nav__list" data-md-scrollfix> 678 679 680 681 682 683 684 685 <li class="md-nav__item"> 686 <a href="ft2-cache_subsystem.html" title="Cache Sub-System" class="md-nav__link"> 687 Cache Sub-System 688 </a> 689 </li> 690 691 692 </ul> 693 </nav> 694 </li> 695 696 697 698 699 700 701 702 703 704 <li class="md-nav__item md-nav__item--active md-nav__item--nested"> 705 706 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8" checked> 707 708 <label class="md-nav__link" for="nav-8"> 709 Support API 710 </label> 711 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 712 <label class="md-nav__title" for="nav-8"> 713 Support API 714 </label> 715 <ul class="md-nav__list" data-md-scrollfix> 716 717 718 719 720 721 722 723 <li class="md-nav__item"> 724 <a href="ft2-computations.html" title="Computations" class="md-nav__link"> 725 Computations 726 </a> 727 </li> 728 729 730 731 732 733 734 735 <li class="md-nav__item"> 736 <a href="ft2-list_processing.html" title="List Processing" class="md-nav__link"> 737 List Processing 738 </a> 739 </li> 740 741 742 743 744 745 746 747 748 749 <li class="md-nav__item md-nav__item--active"> 750 751 <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc"> 752 753 754 755 756 <label class="md-nav__link md-nav__link--active" for="__toc"> 757 Outline Processing 758 </label> 759 760 <a href="ft2-outline_processing.html" title="Outline Processing" class="md-nav__link md-nav__link--active"> 761 Outline Processing 762 </a> 763 764 765<nav class="md-nav md-nav--secondary"> 766 767 768 769 770 771 <label class="md-nav__title" for="__toc">Table of contents</label> 772 <ul class="md-nav__list" data-md-scrollfix> 773 774 <li class="md-nav__item"> 775 <a href="#synopsis" class="md-nav__link"> 776 Synopsis 777 </a> 778 779</li> 780 781 <li class="md-nav__item"> 782 <a href="#ft_outline" class="md-nav__link"> 783 FT_Outline 784 </a> 785 786</li> 787 788 <li class="md-nav__item"> 789 <a href="#ft_outline_new" class="md-nav__link"> 790 FT_Outline_New 791 </a> 792 793</li> 794 795 <li class="md-nav__item"> 796 <a href="#ft_outline_done" class="md-nav__link"> 797 FT_Outline_Done 798 </a> 799 800</li> 801 802 <li class="md-nav__item"> 803 <a href="#ft_outline_copy" class="md-nav__link"> 804 FT_Outline_Copy 805 </a> 806 807</li> 808 809 <li class="md-nav__item"> 810 <a href="#ft_outline_translate" class="md-nav__link"> 811 FT_Outline_Translate 812 </a> 813 814</li> 815 816 <li class="md-nav__item"> 817 <a href="#ft_outline_transform" class="md-nav__link"> 818 FT_Outline_Transform 819 </a> 820 821</li> 822 823 <li class="md-nav__item"> 824 <a href="#ft_outline_embolden" class="md-nav__link"> 825 FT_Outline_Embolden 826 </a> 827 828</li> 829 830 <li class="md-nav__item"> 831 <a href="#ft_outline_emboldenxy" class="md-nav__link"> 832 FT_Outline_EmboldenXY 833 </a> 834 835</li> 836 837 <li class="md-nav__item"> 838 <a href="#ft_outline_reverse" class="md-nav__link"> 839 FT_Outline_Reverse 840 </a> 841 842</li> 843 844 <li class="md-nav__item"> 845 <a href="#ft_outline_check" class="md-nav__link"> 846 FT_Outline_Check 847 </a> 848 849</li> 850 851 <li class="md-nav__item"> 852 <a href="#ft_outline_get_cbox" class="md-nav__link"> 853 FT_Outline_Get_CBox 854 </a> 855 856</li> 857 858 <li class="md-nav__item"> 859 <a href="#ft_outline_get_bbox" class="md-nav__link"> 860 FT_Outline_Get_BBox 861 </a> 862 863</li> 864 865 <li class="md-nav__item"> 866 <a href="#ft_outline_get_bitmap" class="md-nav__link"> 867 FT_Outline_Get_Bitmap 868 </a> 869 870</li> 871 872 <li class="md-nav__item"> 873 <a href="#ft_outline_render" class="md-nav__link"> 874 FT_Outline_Render 875 </a> 876 877</li> 878 879 <li class="md-nav__item"> 880 <a href="#ft_outline_decompose" class="md-nav__link"> 881 FT_Outline_Decompose 882 </a> 883 884</li> 885 886 <li class="md-nav__item"> 887 <a href="#ft_outline_funcs" class="md-nav__link"> 888 FT_Outline_Funcs 889 </a> 890 891</li> 892 893 <li class="md-nav__item"> 894 <a href="#ft_outline_movetofunc" class="md-nav__link"> 895 FT_Outline_MoveToFunc 896 </a> 897 898</li> 899 900 <li class="md-nav__item"> 901 <a href="#ft_outline_linetofunc" class="md-nav__link"> 902 FT_Outline_LineToFunc 903 </a> 904 905</li> 906 907 <li class="md-nav__item"> 908 <a href="#ft_outline_conictofunc" class="md-nav__link"> 909 FT_Outline_ConicToFunc 910 </a> 911 912</li> 913 914 <li class="md-nav__item"> 915 <a href="#ft_outline_cubictofunc" class="md-nav__link"> 916 FT_Outline_CubicToFunc 917 </a> 918 919</li> 920 921 <li class="md-nav__item"> 922 <a href="#ft_orientation" class="md-nav__link"> 923 FT_Orientation 924 </a> 925 926</li> 927 928 <li class="md-nav__item"> 929 <a href="#ft_outline_get_orientation" class="md-nav__link"> 930 FT_Outline_Get_Orientation 931 </a> 932 933</li> 934 935 <li class="md-nav__item"> 936 <a href="#ft_outline_xxx" class="md-nav__link"> 937 FT_OUTLINE_XXX 938 </a> 939 940</li> 941 942 943 944 945 946 </ul> 947 948</nav> 949 950 </li> 951 952 953 954 955 956 957 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 961 </a> 962 </li> 963 964 965 966 967 968 969 970 <li class="md-nav__item"> 971 <a href="ft2-bitmap_handling.html" title="Bitmap Handling" class="md-nav__link"> 972 Bitmap Handling 973 </a> 974 </li> 975 976 977 978 979 980 981 982 <li class="md-nav__item"> 983 <a href="ft2-raster.html" title="Scanline Converter" class="md-nav__link"> 984 Scanline Converter 985 </a> 986 </li> 987 988 989 990 991 992 993 994 <li class="md-nav__item"> 995 <a href="ft2-glyph_stroker.html" title="Glyph Stroker" class="md-nav__link"> 996 Glyph Stroker 997 </a> 998 </li> 999 1000 1001 1002 1003 1004 1005 1006 <li class="md-nav__item"> 1007 <a href="ft2-system_interface.html" title="System Interface" class="md-nav__link"> 1008 System Interface 1009 </a> 1010 </li> 1011 1012 1013 1014 1015 1016 1017 1018 <li class="md-nav__item"> 1019 <a href="ft2-module_management.html" title="Module Management" class="md-nav__link"> 1020 Module Management 1021 </a> 1022 </li> 1023 1024 1025 1026 1027 1028 1029 1030 <li class="md-nav__item"> 1031 <a href="ft2-gzip.html" title="GZIP Streams" class="md-nav__link"> 1032 GZIP Streams 1033 </a> 1034 </li> 1035 1036 1037 1038 1039 1040 1041 1042 <li class="md-nav__item"> 1043 <a href="ft2-lzw.html" title="LZW Streams" class="md-nav__link"> 1044 LZW Streams 1045 </a> 1046 </li> 1047 1048 1049 1050 1051 1052 1053 1054 <li class="md-nav__item"> 1055 <a href="ft2-bzip2.html" title="BZIP2 Streams" class="md-nav__link"> 1056 BZIP2 Streams 1057 </a> 1058 </li> 1059 1060 1061 </ul> 1062 </nav> 1063 </li> 1064 1065 1066 1067 1068 1069 1070 1071 <li class="md-nav__item md-nav__item--nested"> 1072 1073 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9"> 1074 1075 <label class="md-nav__link" for="nav-9"> 1076 Error Codes 1077 </label> 1078 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 1079 <label class="md-nav__title" for="nav-9"> 1080 Error Codes 1081 </label> 1082 <ul class="md-nav__list" data-md-scrollfix> 1083 1084 1085 1086 1087 1088 1089 1090 <li class="md-nav__item"> 1091 <a href="ft2-error_enumerations.html" title="Error Enumerations" class="md-nav__link"> 1092 Error Enumerations 1093 </a> 1094 </li> 1095 1096 1097 1098 1099 1100 1101 1102 <li class="md-nav__item"> 1103 <a href="ft2-error_code_values.html" title="Error Code Values" class="md-nav__link"> 1104 Error Code Values 1105 </a> 1106 </li> 1107 1108 1109 </ul> 1110 </nav> 1111 </li> 1112 1113 1114 1115 1116 1117 1118 1119 <li class="md-nav__item md-nav__item--nested"> 1120 1121 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10"> 1122 1123 <label class="md-nav__link" for="nav-10"> 1124 Miscellaneous 1125 </label> 1126 <nav class="md-nav" data-md-component="collapsible" data-md-level="1"> 1127 <label class="md-nav__title" for="nav-10"> 1128 Miscellaneous 1129 </label> 1130 <ul class="md-nav__list" data-md-scrollfix> 1131 1132 1133 1134 1135 1136 1137 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 1141 </a> 1142 </li> 1143 1144 1145 1146 1147 1148 1149 1150 <li class="md-nav__item"> 1151 <a href="ft2-incremental.html" title="Incremental Loading" class="md-nav__link"> 1152 Incremental Loading 1153 </a> 1154 </li> 1155 1156 1157 1158 1159 1160 1161 1162 <li class="md-nav__item"> 1163 <a href="ft2-truetype_engine.html" title="The TrueType Engine" class="md-nav__link"> 1164 The TrueType Engine 1165 </a> 1166 </li> 1167 1168 1169 1170 1171 1172 1173 1174 <li class="md-nav__item"> 1175 <a href="ft2-ot_validation.html" title="OpenType Validation" class="md-nav__link"> 1176 OpenType Validation 1177 </a> 1178 </li> 1179 1180 1181 </ul> 1182 </nav> 1183 </li> 1184 1185 1186 </ul> 1187</nav> 1188 </div> 1189 </div> 1190 </div> 1191 1192 1193 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc"> 1194 <div class="md-sidebar__scrollwrap"> 1195 <div class="md-sidebar__inner"> 1196 1197<nav class="md-nav md-nav--secondary"> 1198 1199 1200 1201 1202 1203 <label class="md-nav__title" for="__toc">Table of contents</label> 1204 <ul class="md-nav__list" data-md-scrollfix> 1205 1206 <li class="md-nav__item"> 1207 <a href="#synopsis" class="md-nav__link"> 1208 Synopsis 1209 </a> 1210 1211</li> 1212 1213 <li class="md-nav__item"> 1214 <a href="#ft_outline" class="md-nav__link"> 1215 FT_Outline 1216 </a> 1217 1218</li> 1219 1220 <li class="md-nav__item"> 1221 <a href="#ft_outline_new" class="md-nav__link"> 1222 FT_Outline_New 1223 </a> 1224 1225</li> 1226 1227 <li class="md-nav__item"> 1228 <a href="#ft_outline_done" class="md-nav__link"> 1229 FT_Outline_Done 1230 </a> 1231 1232</li> 1233 1234 <li class="md-nav__item"> 1235 <a href="#ft_outline_copy" class="md-nav__link"> 1236 FT_Outline_Copy 1237 </a> 1238 1239</li> 1240 1241 <li class="md-nav__item"> 1242 <a href="#ft_outline_translate" class="md-nav__link"> 1243 FT_Outline_Translate 1244 </a> 1245 1246</li> 1247 1248 <li class="md-nav__item"> 1249 <a href="#ft_outline_transform" class="md-nav__link"> 1250 FT_Outline_Transform 1251 </a> 1252 1253</li> 1254 1255 <li class="md-nav__item"> 1256 <a href="#ft_outline_embolden" class="md-nav__link"> 1257 FT_Outline_Embolden 1258 </a> 1259 1260</li> 1261 1262 <li class="md-nav__item"> 1263 <a href="#ft_outline_emboldenxy" class="md-nav__link"> 1264 FT_Outline_EmboldenXY 1265 </a> 1266 1267</li> 1268 1269 <li class="md-nav__item"> 1270 <a href="#ft_outline_reverse" class="md-nav__link"> 1271 FT_Outline_Reverse 1272 </a> 1273 1274</li> 1275 1276 <li class="md-nav__item"> 1277 <a href="#ft_outline_check" class="md-nav__link"> 1278 FT_Outline_Check 1279 </a> 1280 1281</li> 1282 1283 <li class="md-nav__item"> 1284 <a href="#ft_outline_get_cbox" class="md-nav__link"> 1285 FT_Outline_Get_CBox 1286 </a> 1287 1288</li> 1289 1290 <li class="md-nav__item"> 1291 <a href="#ft_outline_get_bbox" class="md-nav__link"> 1292 FT_Outline_Get_BBox 1293 </a> 1294 1295</li> 1296 1297 <li class="md-nav__item"> 1298 <a href="#ft_outline_get_bitmap" class="md-nav__link"> 1299 FT_Outline_Get_Bitmap 1300 </a> 1301 1302</li> 1303 1304 <li class="md-nav__item"> 1305 <a href="#ft_outline_render" class="md-nav__link"> 1306 FT_Outline_Render 1307 </a> 1308 1309</li> 1310 1311 <li class="md-nav__item"> 1312 <a href="#ft_outline_decompose" class="md-nav__link"> 1313 FT_Outline_Decompose 1314 </a> 1315 1316</li> 1317 1318 <li class="md-nav__item"> 1319 <a href="#ft_outline_funcs" class="md-nav__link"> 1320 FT_Outline_Funcs 1321 </a> 1322 1323</li> 1324 1325 <li class="md-nav__item"> 1326 <a href="#ft_outline_movetofunc" class="md-nav__link"> 1327 FT_Outline_MoveToFunc 1328 </a> 1329 1330</li> 1331 1332 <li class="md-nav__item"> 1333 <a href="#ft_outline_linetofunc" class="md-nav__link"> 1334 FT_Outline_LineToFunc 1335 </a> 1336 1337</li> 1338 1339 <li class="md-nav__item"> 1340 <a href="#ft_outline_conictofunc" class="md-nav__link"> 1341 FT_Outline_ConicToFunc 1342 </a> 1343 1344</li> 1345 1346 <li class="md-nav__item"> 1347 <a href="#ft_outline_cubictofunc" class="md-nav__link"> 1348 FT_Outline_CubicToFunc 1349 </a> 1350 1351</li> 1352 1353 <li class="md-nav__item"> 1354 <a href="#ft_orientation" class="md-nav__link"> 1355 FT_Orientation 1356 </a> 1357 1358</li> 1359 1360 <li class="md-nav__item"> 1361 <a href="#ft_outline_get_orientation" class="md-nav__link"> 1362 FT_Outline_Get_Orientation 1363 </a> 1364 1365</li> 1366 1367 <li class="md-nav__item"> 1368 <a href="#ft_outline_xxx" class="md-nav__link"> 1369 FT_OUTLINE_XXX 1370 </a> 1371 1372</li> 1373 1374 1375 1376 1377 1378 </ul> 1379 1380</nav> 1381 </div> 1382 </div> 1383 </div> 1384 1385 1386 <div class="md-content"> 1387 <article class="md-content__inner md-typeset"> 1388 1389 1390 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> 1392<hr /> 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_ 1399 { 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 */ 1402 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 */ 1406 1407 <span class="keyword">int</span> flags; /* outline masks */ 1408 1409 } <b>FT_Outline</b>; 1410</code></pre></div> 1411 1412<p>This structure is used to describe an outline to the scan-line converter.</p> 1413<h4>fields</h4> 1414 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> 1418</td></tr> 1419<tr><td class="val" id="n_points">n_points</td><td class="desc"> 1420<p>The number of points in the outline.</p> 1421</td></tr> 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> 1424</td></tr> 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> 1431</td></tr> 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> 1434</td></tr> 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> 1437</td></tr> 1438</table> 1439 1440<h4>note</h4> 1441 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> 1443<hr> 1444 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 ); 1452</code></pre></div> 1453 1454<p>Create a new outline of a given size.</p> 1455<h4>input</h4> 1456 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> 1460</td></tr> 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> 1463</td></tr> 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> 1466</td></tr> 1467</table> 1468 1469<h4>output</h4> 1470 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> 1474</td></tr> 1475</table> 1476 1477<h4>return</h4> 1478 1479<p>FreeType error code. 0 means success.</p> 1480<h4>note</h4> 1481 1482<p>The reason why this function takes a <code>library</code> parameter is simply to use the library's memory allocator.</p> 1483<hr> 1484 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 ); 1490</code></pre></div> 1491 1492<p>Destroy an outline created with <code><a href="ft2-outline_processing.html#ft_outline_new">FT_Outline_New</a></code>.</p> 1493<h4>input</h4> 1494 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> 1498</td></tr> 1499<tr><td class="val" id="outline">outline</td><td class="desc"> 1500<p>A pointer to the outline object to be discarded.</p> 1501</td></tr> 1502</table> 1503 1504<h4>return</h4> 1505 1506<p>FreeType error code. 0 means success.</p> 1507<h4>note</h4> 1508 1509<p>If the outline's ‘owner’ field is not set, only the outline descriptor will be released.</p> 1510<hr> 1511 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 ); 1517</code></pre></div> 1518 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> 1520<h4>input</h4> 1521 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> 1525</td></tr> 1526</table> 1527 1528<h4>output</h4> 1529 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> 1533</td></tr> 1534</table> 1535 1536<h4>return</h4> 1537 1538<p>FreeType error code. 0 means success.</p> 1539<hr> 1540 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 ); 1547</code></pre></div> 1548 1549<p>Apply a simple translation to the points of an outline.</p> 1550<h4>inout</h4> 1551 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> 1555</td></tr> 1556</table> 1557 1558<h4>input</h4> 1559 1560<table class="fields"> 1561<tr><td class="val" id="xoffset">xOffset</td><td class="desc"> 1562<p>The horizontal offset.</p> 1563</td></tr> 1564<tr><td class="val" id="yoffset">yOffset</td><td class="desc"> 1565<p>The vertical offset.</p> 1566</td></tr> 1567</table> 1568 1569<hr> 1570 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 ); 1576</code></pre></div> 1577 1578<p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p> 1579<h4>inout</h4> 1580 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> 1584</td></tr> 1585</table> 1586 1587<h4>input</h4> 1588 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> 1592</td></tr> 1593</table> 1594 1595<h4>note</h4> 1596 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> 1598<hr> 1599 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 ); 1605</code></pre></div> 1606 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> 1609<h4>inout</h4> 1610 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> 1614</td></tr> 1615</table> 1616 1617<h4>input</h4> 1618 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> 1622</td></tr> 1623</table> 1624 1625<h4>return</h4> 1626 1627<p>FreeType error code. 0 means success.</p> 1628<h4>note</h4> 1629 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> 1633<h4>example</h4> 1634 1635<div class="highlight"><pre><span></span><code> FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); 1636 1637 if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) 1638 FT_Outline_Embolden( &face->glyph->outline, strength ); 1639</code></pre></div> 1640 1641<hr> 1642 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 ); 1649</code></pre></div> 1650 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> 1652<h4>since</h4> 1653 1654<p>2.4.10</p> 1655<hr> 1656 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 ); 1661</code></pre></div> 1662 1663<p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p> 1664<h4>inout</h4> 1665 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> 1669</td></tr> 1670</table> 1671 1672<h4>note</h4> 1673 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> 1676<hr> 1677 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 ); 1682</code></pre></div> 1683 1684<p>Check the contents of an outline descriptor.</p> 1685<h4>input</h4> 1686 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> 1690</td></tr> 1691</table> 1692 1693<h4>return</h4> 1694 1695<p>FreeType error code. 0 means success.</p> 1696<h4>note</h4> 1697 1698<p>An empty outline, or an outline with a single point only is also valid.</p> 1699<hr> 1700 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 ); 1706</code></pre></div> 1707 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> 1710<h4>input</h4> 1711 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> 1715</td></tr> 1716</table> 1717 1718<h4>output</h4> 1719 1720<table class="fields"> 1721<tr><td class="val" id="acbox">acbox</td><td class="desc"> 1722<p>The outline's control box.</p> 1723</td></tr> 1724</table> 1725 1726<h4>note</h4> 1727 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> 1729<hr> 1730 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 ); 1736</code></pre></div> 1737 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> 1739<h4>input</h4> 1740 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> 1744</td></tr> 1745</table> 1746 1747<h4>output</h4> 1748 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> 1752</td></tr> 1753</table> 1754 1755<h4>return</h4> 1756 1757<p>FreeType error code. 0 means success.</p> 1758<h4>note</h4> 1759 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> 1761<hr> 1762 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 ); 1769</code></pre></div> 1770 1771<p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p> 1772<h4>input</h4> 1773 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> 1777</td></tr> 1778<tr><td class="val" id="outline">outline</td><td class="desc"> 1779<p>A pointer to the source outline descriptor.</p> 1780</td></tr> 1781</table> 1782 1783<h4>inout</h4> 1784 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> 1788</td></tr> 1789</table> 1790 1791<h4>return</h4> 1792 1793<p>FreeType error code. 0 means success.</p> 1794<h4>note</h4> 1795 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> 1799<hr> 1800 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 ); 1807</code></pre></div> 1808 1809<p>Render an outline within a bitmap using the current scan-convert.</p> 1810<h4>input</h4> 1811 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> 1815</td></tr> 1816<tr><td class="val" id="outline">outline</td><td class="desc"> 1817<p>A pointer to the source outline descriptor.</p> 1818</td></tr> 1819</table> 1820 1821<h4>inout</h4> 1822 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> 1826</td></tr> 1827</table> 1828 1829<h4>return</h4> 1830 1831<p>FreeType error code. 0 means success.</p> 1832<h4>note</h4> 1833 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> 1835<hr> 1836 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 ); 1843</code></pre></div> 1844 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> 1846<h4>input</h4> 1847 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> 1851</td></tr> 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> 1854</td></tr> 1855</table> 1856 1857<h4>inout</h4> 1858 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> 1862</td></tr> 1863</table> 1864 1865<h4>return</h4> 1866 1867<p>FreeType error code. 0 means success.</p> 1868<h4>note</h4> 1869 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> 1872<hr> 1873 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_ 1877 { 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; 1882 1883 <span class="keyword">int</span> shift; 1884 <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> delta; 1885 1886 } <b>FT_Outline_Funcs</b>; 1887</code></pre></div> 1888 1889<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers.</p> 1890<h4>fields</h4> 1891 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> 1895</td></tr> 1896<tr><td class="val" id="line_to">line_to</td><td class="desc"> 1897<p>The segment emitter.</p> 1898</td></tr> 1899<tr><td class="val" id="conic_to">conic_to</td><td class="desc"> 1900<p>The second-order Bezier arc emitter.</p> 1901</td></tr> 1902<tr><td class="val" id="cubic_to">cubic_to</td><td class="desc"> 1903<p>The third-order Bezier arc emitter.</p> 1904</td></tr> 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> 1907</td></tr> 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> 1910</td></tr> 1911</table> 1912 1913<h4>note</h4> 1914 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> 1920<hr> 1921 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 ); 1927 1928#<span class="keyword">define</span> FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b> 1929</code></pre></div> 1930 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> 1933<h4>input</h4> 1934 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> 1938</td></tr> 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> 1941</td></tr> 1942</table> 1943 1944<h4>return</h4> 1945 1946<p>Error code. 0 means success.</p> 1947<hr> 1948 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 ); 1954 1955#<span class="keyword">define</span> FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b> 1956</code></pre></div> 1957 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> 1960<h4>input</h4> 1961 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> 1965</td></tr> 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> 1968</td></tr> 1969</table> 1970 1971<h4>return</h4> 1972 1973<p>Error code. 0 means success.</p> 1974<hr> 1975 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 ); 1982 1983#<span class="keyword">define</span> FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b> 1984</code></pre></div> 1985 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> 1988<h4>input</h4> 1989 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> 1993</td></tr> 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> 1996</td></tr> 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> 1999</td></tr> 2000</table> 2001 2002<h4>return</h4> 2003 2004<p>Error code. 0 means success.</p> 2005<hr> 2006 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 ); 2014 2015#<span class="keyword">define</span> FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b> 2016</code></pre></div> 2017 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> 2020<h4>input</h4> 2021 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> 2025</td></tr> 2026<tr><td class="val" id="control2">control2</td><td class="desc"> 2027<p>A pointer to the second Bezier control point.</p> 2028</td></tr> 2029<tr><td class="val" id="to">to</td><td class="desc"> 2030<p>A pointer to the target end point.</p> 2031</td></tr> 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> 2034</td></tr> 2035</table> 2036 2037<h4>return</h4> 2038 2039<p>Error code. 0 means success.</p> 2040<hr> 2041 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_ 2045 { 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> 2051 2052 } <b>FT_Orientation</b>; 2053</code></pre></div> 2054 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> 2057<h4>values</h4> 2058 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> 2062</td></tr> 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> 2065</td></tr> 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> 2068</td></tr> 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> 2071</td></tr> 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> 2074</td></tr> 2075</table> 2076 2077<hr> 2078 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 ); 2083</code></pre></div> 2084 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> 2087<h4>input</h4> 2088 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> 2092</td></tr> 2093</table> 2094 2095<h4>return</h4> 2096 2097<p>The orientation.</p> 2098<hr> 2099 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 2110 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 2113 2114 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> 2124</code></pre></div> 2125 2126<p>A list of bit-field constants used for the flags in an outline's <code>flags</code> field.</p> 2127<h4>values</h4> 2128 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> 2132</td></tr> 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> 2135</td></tr> 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> 2138</td></tr> 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> 2141</td></tr> 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> 2144</td></tr> 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> 2147</td></tr> 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> 2150</td></tr> 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> 2153</td></tr> 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> 2156</td></tr> 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> 2159</td></tr> 2160</table> 2161 2162<h4>note</h4> 2163 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> 2167<hr> 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 </article> 2179 </div> 2180 </div> 2181 </main> 2182 2183 2184<footer class="md-footer"> 2185 2186 <div class="md-footer-nav"> 2187 <nav class="md-footer-nav__inner md-grid"> 2188 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> 2192 </div> 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"> 2196 Previous 2197 </span> 2198 List Processing 2199 </span> 2200 </div> 2201 </a> 2202 2203 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"> 2208 Next 2209 </span> 2210 Quick retrieval of advance values 2211 </span> 2212 </div> 2213 <div class="md-flex__cell md-flex__cell--shrink"> 2214 <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i> 2215 </div> 2216 </a> 2217 2218 </nav> 2219 </div> 2220 2221 <div class="md-footer-meta md-typeset"> 2222 <div class="md-footer-meta__inner md-grid"> 2223 <div class="md-footer-copyright"> 2224 2225 <div class="md-footer-copyright__highlight"> 2226 Copyright 2020 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. 2227 </div> 2228 2229 powered by 2230 <a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a> 2231 and 2232 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> 2233 Material for MkDocs</a> 2234 </div> 2235 2236 </div> 2237 </div> 2238</footer> 2239 2240 </div> 2241 2242 <script src="assets/javascripts/application.c33a9706.js"></script> 2243 2244 <script>app.initialize({version:"1.1",url:{base:"."}})</script> 2245 2246 <script src="javascripts/extra.js"></script> 2247 2248 2249 </body> 2250</html>