OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftoption.h */ | 3 /* ftoption.h */ |
4 /* */ | 4 /* */ |
5 /* User-selectable configuration macros (specification only). */ | 5 /* User-selectable configuration macros (specification only). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2011 by */ | 7 /* Copyright 1996-2013 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 /* fopen() etc. Enables the use of smaller system libraries on embedded */ | 209 /* fopen() etc. Enables the use of smaller system libraries on embedded */ |
210 /* systems that have multiple system libraries, some with or without */ | 210 /* systems that have multiple system libraries, some with or without */ |
211 /* file stream support, in the cases where file stream support is not */ | 211 /* file stream support, in the cases where file stream support is not */ |
212 /* necessary such as memory loading of font files. */ | 212 /* necessary such as memory loading of font files. */ |
213 /* */ | 213 /* */ |
214 /* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ | 214 /* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ |
215 | 215 |
216 | 216 |
217 /*************************************************************************/ | 217 /*************************************************************************/ |
218 /* */ | 218 /* */ |
| 219 /* PNG bitmap support. */ |
| 220 /* */ |
| 221 /* FreeType now handles loading color bitmap glyphs in the PNG format. */ |
| 222 /* This requires help from the external libpng library. Uncompressed */ |
| 223 /* color bitmaps do not need any external libraries and will be */ |
| 224 /* supported regardless of this configuration. */ |
| 225 /* */ |
| 226 /* Define this macro if you want to enable this `feature'. */ |
| 227 /* */ |
| 228 #define FT_CONFIG_OPTION_USE_PNG |
| 229 |
| 230 |
| 231 /*************************************************************************/ |
| 232 /* */ |
219 /* DLL export compilation */ | 233 /* DLL export compilation */ |
220 /* */ | 234 /* */ |
221 /* When compiling FreeType as a DLL, some systems/compilers need a */ | 235 /* When compiling FreeType as a DLL, some systems/compilers need a */ |
222 /* special keyword in front OR after the return type of function */ | 236 /* special keyword in front OR after the return type of function */ |
223 /* declarations. */ | 237 /* declarations. */ |
224 /* */ | 238 /* */ |
225 /* Two macros are used within the FreeType source code to define */ | 239 /* Two macros are used within the FreeType source code to define */ |
226 /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ | 240 /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ |
227 /* */ | 241 /* */ |
228 /* FT_EXPORT( return_type ) */ | 242 /* FT_EXPORT( return_type ) */ |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 /* TrueType glyphs without hinting. */ | 567 /* TrueType glyphs without hinting. */ |
554 /* */ | 568 /* */ |
555 /* Do not #undef this macro here, since the build system might */ | 569 /* Do not #undef this macro here, since the build system might */ |
556 /* define it for certain configurations only. */ | 570 /* define it for certain configurations only. */ |
557 /* */ | 571 /* */ |
558 /* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ | 572 /* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ |
559 | 573 |
560 | 574 |
561 /*************************************************************************/ | 575 /*************************************************************************/ |
562 /* */ | 576 /* */ |
| 577 /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ |
| 578 /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ |
| 579 /* replaces the native TrueType hinting mechanism when anything but */ |
| 580 /* FT_RENDER_MODE_MONO is requested. */ |
| 581 /* */ |
| 582 /* Enabling this causes the TrueType driver to ignore instructions under */ |
| 583 /* certain conditions. This is done in accordance with the guide here, */ |
| 584 /* with some minor differences: */ |
| 585 /* */ |
| 586 /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ |
| 587 /* */ |
| 588 /* By undefining this, you only compile the code necessary to hint */ |
| 589 /* TrueType glyphs with native TT hinting. */ |
| 590 /* */ |
| 591 /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ |
| 592 /* defined. */ |
| 593 /* */ |
| 594 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ |
| 595 |
| 596 |
| 597 /*************************************************************************/ |
| 598 /* */ |
563 /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ | 599 /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ |
564 /* of the TrueType bytecode interpreter is used that doesn't implement */ | 600 /* of the TrueType bytecode interpreter is used that doesn't implement */ |
565 /* any of the patented opcodes and algorithms. The patents related to */ | 601 /* any of the patented opcodes and algorithms. The patents related to */ |
566 /* TrueType hinting have expired worldwide since May 2010; this option */ | 602 /* TrueType hinting have expired worldwide since May 2010; this option */ |
567 /* is now deprecated. */ | 603 /* is now deprecated. */ |
568 /* */ | 604 /* */ |
569 /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ | 605 /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ |
570 /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ | 606 /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ |
571 /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ | 607 /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ |
572 /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ | 608 /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 /*************************************************************************/ | 698 /*************************************************************************/ |
663 /**** ****/ | 699 /**** ****/ |
664 /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ | 700 /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ |
665 /**** ****/ | 701 /**** ****/ |
666 /*************************************************************************/ | 702 /*************************************************************************/ |
667 /*************************************************************************/ | 703 /*************************************************************************/ |
668 | 704 |
669 | 705 |
670 /*************************************************************************/ | 706 /*************************************************************************/ |
671 /* */ | 707 /* */ |
672 /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ | 708 /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */ |
673 /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ | 709 /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ |
674 /* required. */ | 710 /* required. */ |
675 /* */ | 711 /* */ |
676 #define T1_MAX_DICT_DEPTH 5 | 712 #define T1_MAX_DICT_DEPTH 5 |
677 | 713 |
678 | 714 |
679 /*************************************************************************/ | 715 /*************************************************************************/ |
680 /* */ | 716 /* */ |
681 /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ | 717 /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ |
682 /* calls during glyph loading. */ | 718 /* calls during glyph loading. */ |
(...skipping 26 matching lines...) Expand all Loading... |
709 /* Define this configuration macro if you want to prevent the */ | 745 /* Define this configuration macro if you want to prevent the */ |
710 /* compilation of the Multiple Masters font support in the Type 1 */ | 746 /* compilation of the Multiple Masters font support in the Type 1 */ |
711 /* driver. */ | 747 /* driver. */ |
712 /* */ | 748 /* */ |
713 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT | 749 #undef T1_CONFIG_OPTION_NO_MM_SUPPORT |
714 | 750 |
715 | 751 |
716 /*************************************************************************/ | 752 /*************************************************************************/ |
717 /*************************************************************************/ | 753 /*************************************************************************/ |
718 /**** ****/ | 754 /**** ****/ |
| 755 /**** C F F D R I V E R C O N F I G U R A T I O N ****/ |
| 756 /**** ****/ |
| 757 /*************************************************************************/ |
| 758 /*************************************************************************/ |
| 759 |
| 760 |
| 761 /*************************************************************************/ |
| 762 /* */ |
| 763 /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */ |
| 764 /* engine gets compiled into FreeType. If defined, it is possible to */ |
| 765 /* switch between the two engines using the `hinting-engine' property of */ |
| 766 /* the cff driver module. */ |
| 767 /* */ |
| 768 /* #define CFF_CONFIG_OPTION_OLD_ENGINE */ |
| 769 |
| 770 |
| 771 /*************************************************************************/ |
| 772 /*************************************************************************/ |
| 773 /**** ****/ |
719 /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ | 774 /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ |
720 /**** ****/ | 775 /**** ****/ |
721 /*************************************************************************/ | 776 /*************************************************************************/ |
722 /*************************************************************************/ | 777 /*************************************************************************/ |
723 | 778 |
724 | 779 |
725 /*************************************************************************/ | 780 /*************************************************************************/ |
726 /* */ | 781 /* */ |
727 /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ | 782 /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ |
728 /* support. */ | 783 /* support. */ |
(...skipping 16 matching lines...) Expand all Loading... |
745 /* */ | 800 /* */ |
746 /* This experimental option is only active if the render mode is */ | 801 /* This experimental option is only active if the render mode is */ |
747 /* FT_RENDER_MODE_LIGHT. */ | 802 /* FT_RENDER_MODE_LIGHT. */ |
748 /* */ | 803 /* */ |
749 /* #define AF_CONFIG_OPTION_USE_WARPER */ | 804 /* #define AF_CONFIG_OPTION_USE_WARPER */ |
750 | 805 |
751 /* */ | 806 /* */ |
752 | 807 |
753 | 808 |
754 /* | 809 /* |
755 * Define this variable if you want to keep the layout of internal | 810 * This macro is obsolete. Support has been removed in FreeType |
756 * structures that was used prior to FreeType 2.2. This also compiles in | 811 * version 2.5. |
757 * a few obsolete functions to avoid linking problems on typical Unix | |
758 * distributions. | |
759 * | |
760 * For embedded systems or building a new distribution from scratch, it | |
761 * is recommended to disable the macro since it reduces the library's code | |
762 * size and activates a few memory-saving optimizations as well. | |
763 */ | 812 */ |
764 #define FT_CONFIG_OPTION_OLD_INTERNALS | 813 /* #define FT_CONFIG_OPTION_OLD_INTERNALS */ |
765 | 814 |
766 | 815 |
767 /* | 816 /* |
768 * To detect legacy cache-lookup call from a rogue client (<= 2.1.7), | |
769 * we restrict the number of charmaps in a font. The current API of | |
770 * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API | |
771 * takes charcode only. To determine the passed value is for cmap_index | |
772 * or charcode, the possible cmap_index is restricted not to exceed | |
773 * the minimum possible charcode by a rogue client. It is also very | |
774 * unlikely that a rogue client is interested in Unicode values 0 to 15. | |
775 * | |
776 * NOTE: The original threshold was 4 deduced from popular number of | |
777 * cmap subtables in UCS-4 TrueType fonts, but now it is not | |
778 * irregular for OpenType fonts to have more than 4 subtables, | |
779 * because variation selector subtables are available for Apple | |
780 * and Microsoft platforms. | |
781 */ | |
782 | |
783 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
784 #define FT_MAX_CHARMAP_CACHEABLE 15 | |
785 #endif | |
786 | |
787 | |
788 /* | |
789 * This macro is defined if either unpatented or native TrueType | 817 * This macro is defined if either unpatented or native TrueType |
790 * hinting is requested by the definitions above. | 818 * hinting is requested by the definitions above. |
791 */ | 819 */ |
792 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER | 820 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER |
793 #define TT_USE_BYTECODE_INTERPRETER | 821 #define TT_USE_BYTECODE_INTERPRETER |
794 #undef TT_CONFIG_OPTION_UNPATENTED_HINTING | 822 #undef TT_CONFIG_OPTION_UNPATENTED_HINTING |
795 #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING | 823 #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING |
796 #define TT_USE_BYTECODE_INTERPRETER | 824 #define TT_USE_BYTECODE_INTERPRETER |
797 #endif | 825 #endif |
798 | 826 |
799 FT_END_HEADER | 827 FT_END_HEADER |
800 | 828 |
801 | 829 |
802 #endif /* __FTOPTION_H__ */ | 830 #endif /* __FTOPTION_H__ */ |
803 | 831 |
804 | 832 |
805 /* END */ | 833 /* END */ |
OLD | NEW |