Chromium Code Reviews| 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-2014 by */ | 7 /* Copyright 1996-2015 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 13 matching lines...) Expand all Loading... | |
| 31 /* */ | 31 /* */ |
| 32 /* This file contains the default configuration macro definitions for */ | 32 /* This file contains the default configuration macro definitions for */ |
| 33 /* a standard build of the FreeType library. There are three ways to */ | 33 /* a standard build of the FreeType library. There are three ways to */ |
| 34 /* use this file to build project-specific versions of the library: */ | 34 /* use this file to build project-specific versions of the library: */ |
| 35 /* */ | 35 /* */ |
| 36 /* - You can modify this file by hand, but this is not recommended in */ | 36 /* - You can modify this file by hand, but this is not recommended in */ |
| 37 /* cases where you would like to build several versions of the */ | 37 /* cases where you would like to build several versions of the */ |
| 38 /* library from a single source directory. */ | 38 /* library from a single source directory. */ |
| 39 /* */ | 39 /* */ |
| 40 /* - You can put a copy of this file in your build directory, more */ | 40 /* - You can put a copy of this file in your build directory, more */ |
| 41 /* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */ | 41 /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ |
| 42 /* name of a directory that is included _before_ the FreeType include */ | 42 /* is the name of a directory that is included _before_ the FreeType */ |
| 43 /* path during compilation. */ | 43 /* include path during compilation. */ |
| 44 /* */ | 44 /* */ |
| 45 /* The default FreeType Makefiles and Jamfiles use the build */ | 45 /* The default FreeType Makefiles and Jamfiles use the build */ |
| 46 /* directory `builds/<system>' by default, but you can easily change */ | 46 /* directory `builds/<system>' by default, but you can easily change */ |
| 47 /* that for your own projects. */ | 47 /* that for your own projects. */ |
| 48 /* */ | 48 /* */ |
| 49 /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ | 49 /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ |
| 50 /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ | 50 /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ |
| 51 /* locate this file during the build. For example, */ | 51 /* locate this file during the build. For example, */ |
| 52 /* */ | 52 /* */ |
| 53 /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ | 53 /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ |
| 54 /* #include <config/ftheader.h> */ | 54 /* #include <freetype/config/ftheader.h> */ |
| 55 /* */ | 55 /* */ |
| 56 /* will use `$BUILD/myftoptions.h' instead of this file for macro */ | 56 /* will use `$BUILD/myftoptions.h' instead of this file for macro */ |
| 57 /* definitions. */ | 57 /* definitions. */ |
| 58 /* */ | 58 /* */ |
| 59 /* Note also that you can similarly pre-define the macro */ | 59 /* Note also that you can similarly pre-define the macro */ |
| 60 /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ | 60 /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ |
| 61 /* that are statically linked to the library at compile time. By */ | 61 /* that are statically linked to the library at compile time. By */ |
| 62 /* default, this file is <config/ftmodule.h>. */ | 62 /* default, this file is <freetype/config/ftmodule.h>. */ |
| 63 /* */ | 63 /* */ |
| 64 /* We highly recommend using the third method whenever possible. */ | 64 /* We highly recommend using the third method whenever possible. */ |
| 65 /* */ | 65 /* */ |
| 66 /*************************************************************************/ | 66 /*************************************************************************/ |
| 67 | 67 |
| 68 | 68 |
| 69 /*************************************************************************/ | 69 /*************************************************************************/ |
| 70 /*************************************************************************/ | 70 /*************************************************************************/ |
| 71 /**** ****/ | 71 /**** ****/ |
| 72 /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ | 72 /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 85 /* */ | 85 /* */ |
| 86 /* This macro has no impact on the FreeType API, only on its */ | 86 /* This macro has no impact on the FreeType API, only on its */ |
| 87 /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ | 87 /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ |
| 88 /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ | 88 /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ |
| 89 /* the original size in case this macro isn't defined; however, each */ | 89 /* the original size in case this macro isn't defined; however, each */ |
| 90 /* triplet of subpixels has R=G=B. */ | 90 /* triplet of subpixels has R=G=B. */ |
| 91 /* */ | 91 /* */ |
| 92 /* This is done to allow FreeType clients to run unmodified, forcing */ | 92 /* This is done to allow FreeType clients to run unmodified, forcing */ |
| 93 /* them to display normal gray-level anti-aliased glyphs. */ | 93 /* them to display normal gray-level anti-aliased glyphs. */ |
| 94 /* */ | 94 /* */ |
| 95 #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING | 95 #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING |
| 96 | 96 |
| 97 | 97 |
| 98 /*************************************************************************/ | 98 /*************************************************************************/ |
| 99 /* */ | 99 /* */ |
| 100 /* Many compilers provide a non-ANSI 64-bit data type that can be used */ | 100 /* Many compilers provide a non-ANSI 64-bit data type that can be used */ |
| 101 /* by FreeType to speed up some computations. However, this will create */ | 101 /* by FreeType to speed up some computations. However, this will create */ |
| 102 /* some problems when compiling the library in strict ANSI mode. */ | 102 /* some problems when compiling the library in strict ANSI mode. */ |
| 103 /* */ | 103 /* */ |
| 104 /* For this reason, the use of 64-bit integers is normally disabled when */ | 104 /* For this reason, the use of 64-bit integers is normally disabled when */ |
| 105 /* the __STDC__ macro is defined. You can however disable this by */ | 105 /* the __STDC__ macro is defined. You can however disable this by */ |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 /* as the Ghostscript interpreter for the PostScript language. */ | 371 /* as the Ghostscript interpreter for the PostScript language. */ |
| 372 /* */ | 372 /* */ |
| 373 #define FT_CONFIG_OPTION_INCREMENTAL | 373 #define FT_CONFIG_OPTION_INCREMENTAL |
| 374 | 374 |
| 375 | 375 |
| 376 /*************************************************************************/ | 376 /*************************************************************************/ |
| 377 /* */ | 377 /* */ |
| 378 /* The size in bytes of the render pool used by the scan-line converter */ | 378 /* The size in bytes of the render pool used by the scan-line converter */ |
| 379 /* to do all of its work. */ | 379 /* to do all of its work. */ |
| 380 /* */ | 380 /* */ |
| 381 /* This must be greater than 4KByte if you use FreeType to rasterize */ | |
| 382 /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ | |
| 383 /* allocation of the render pool. */ | |
| 384 /* */ | |
| 385 #define FT_RENDER_POOL_SIZE 16384L | 381 #define FT_RENDER_POOL_SIZE 16384L |
| 386 | 382 |
| 387 | 383 |
| 388 /*************************************************************************/ | 384 /*************************************************************************/ |
| 389 /* */ | 385 /* */ |
| 390 /* FT_MAX_MODULES */ | 386 /* FT_MAX_MODULES */ |
| 391 /* */ | 387 /* */ |
| 392 /* The maximum number of modules that can be registered in a single */ | 388 /* The maximum number of modules that can be registered in a single */ |
| 393 /* FreeType library object. 32 is the default. */ | 389 /* FreeType library object. 32 is the default. */ |
| 394 /* */ | 390 /* */ |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 /* _af_debug_disable_horz_hints */ | 424 /* _af_debug_disable_horz_hints */ |
| 429 /* _af_debug_disable_vert_hints */ | 425 /* _af_debug_disable_vert_hints */ |
| 430 /* _af_debug_disable_blue_hints */ | 426 /* _af_debug_disable_blue_hints */ |
| 431 /* */ | 427 /* */ |
| 432 /* Additionally, the following functions provide dumps of various */ | 428 /* Additionally, the following functions provide dumps of various */ |
| 433 /* internal autofit structures to stdout (using `printf'): */ | 429 /* internal autofit structures to stdout (using `printf'): */ |
| 434 /* */ | 430 /* */ |
| 435 /* af_glyph_hints_dump_points */ | 431 /* af_glyph_hints_dump_points */ |
| 436 /* af_glyph_hints_dump_segments */ | 432 /* af_glyph_hints_dump_segments */ |
| 437 /* af_glyph_hints_dump_edges */ | 433 /* af_glyph_hints_dump_edges */ |
| 434 /* af_glyph_hints_get_num_segments */ | |
| 435 /* af_glyph_hints_get_segment_offset */ | |
| 438 /* */ | 436 /* */ |
| 439 /* As an argument, they use another global variable: */ | 437 /* As an argument, they use another global variable: */ |
| 440 /* */ | 438 /* */ |
| 441 /* _af_debug_hints */ | 439 /* _af_debug_hints */ |
| 442 /* */ | 440 /* */ |
| 443 /* Please have a look at the `ftgrid' demo program to see how those */ | 441 /* Please have a look at the `ftgrid' demo program to see how those */ |
| 444 /* variables and macros should be used. */ | 442 /* variables and macros should be used. */ |
| 445 /* */ | 443 /* */ |
| 446 /* Do not #undef these macros here since the build system might define */ | 444 /* Do not #undef these macros here since the build system might define */ |
| 447 /* them for certain configurations only. */ | 445 /* them for certain configurations only. */ |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 /* */ | 650 /* */ |
| 653 /* error = FT_Open_Face( library, &open_args, index, &face ); */ | 651 /* error = FT_Open_Face( library, &open_args, index, &face ); */ |
| 654 /* ... */ | 652 /* ... */ |
| 655 /* } */ | 653 /* } */ |
| 656 /* */ | 654 /* */ |
| 657 /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ | 655 /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ |
| 658 | 656 |
| 659 | 657 |
| 660 /*************************************************************************/ | 658 /*************************************************************************/ |
| 661 /* */ | 659 /* */ |
| 662 /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ | |
| 663 /* bytecode interpreter with a huge switch statement, rather than a call */ | |
| 664 /* table. This results in smaller and faster code for a number of */ | |
| 665 /* architectures. */ | |
| 666 /* */ | |
| 667 /* Note however that on some compiler/processor combinations, undefining */ | |
| 668 /* this macro will generate faster, though larger, code. */ | |
| 669 /* */ | |
| 670 #define TT_CONFIG_OPTION_INTERPRETER_SWITCH | |
| 671 | |
| 672 | |
| 673 /*************************************************************************/ | |
| 674 /* */ | |
| 675 /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ | 660 /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ |
| 676 /* TrueType glyph loader to use Apple's definition of how to handle */ | 661 /* TrueType glyph loader to use Apple's definition of how to handle */ |
| 677 /* component offsets in composite glyphs. */ | 662 /* component offsets in composite glyphs. */ |
| 678 /* */ | 663 /* */ |
| 679 /* Apple and MS disagree on the default behavior of component offsets */ | 664 /* Apple and MS disagree on the default behavior of component offsets */ |
| 680 /* in composites. Apple says that they should be scaled by the scaling */ | 665 /* in composites. Apple says that they should be scaled by the scaling */ |
| 681 /* factors in the transformation matrix (roughly, it's more complex) */ | 666 /* factors in the transformation matrix (roughly, it's more complex) */ |
| 682 /* while MS says they should not. OpenType defines two bits in the */ | 667 /* while MS says they should not. OpenType defines two bits in the */ |
| 683 /* composite flags array which can be used to disambiguate, but old */ | 668 /* composite flags array which can be used to disambiguate, but old */ |
| 684 /* fonts will not have them. */ | 669 /* fonts will not have them. */ |
| 685 /* */ | 670 /* */ |
| 686 /* http://www.microsoft.com/typography/otspec/glyf.htm */ | 671 /* http://www.microsoft.com/typography/otspec/glyf.htm */ |
| 687 /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ | 672 /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gly f.html */ |
| 688 /* */ | 673 /* */ |
| 689 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED | 674 #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED |
| 690 | 675 |
| 691 | 676 |
| 692 /*************************************************************************/ | 677 /*************************************************************************/ |
| 693 /* */ | 678 /* */ |
| 694 /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ | 679 /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ |
| 695 /* support for Apple's distortable font technology (fvar, gvar, cvar, */ | 680 /* support for Apple's distortable font technology (fvar, gvar, cvar, */ |
| 696 /* and avar tables). This has many similarities to Type 1 Multiple */ | 681 /* and avar tables). This has many similarities to Type 1 Multiple */ |
| 697 /* Masters support. */ | 682 /* Masters support. */ |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 828 #define AF_CONFIG_OPTION_INDIC | 813 #define AF_CONFIG_OPTION_INDIC |
| 829 | 814 |
| 830 /*************************************************************************/ | 815 /*************************************************************************/ |
| 831 /* */ | 816 /* */ |
| 832 /* Compile autofit module with warp hinting. The idea of the warping */ | 817 /* Compile autofit module with warp hinting. The idea of the warping */ |
| 833 /* code is to slightly scale and shift a glyph within a single dimension */ | 818 /* code is to slightly scale and shift a glyph within a single dimension */ |
| 834 /* so that as much of its segments are aligned (more or less) on the */ | 819 /* so that as much of its segments are aligned (more or less) on the */ |
| 835 /* grid. To find out the optimal scaling and shifting value, various */ | 820 /* grid. To find out the optimal scaling and shifting value, various */ |
| 836 /* parameter combinations are tried and scored. */ | 821 /* parameter combinations are tried and scored. */ |
| 837 /* */ | 822 /* */ |
| 838 /* This experimental option is only active if the render mode is */ | 823 /* This experimental option is active only if the rendering mode is */ |
| 839 /* FT_RENDER_MODE_LIGHT. */ | 824 /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */ |
| 825 /* `warping' property of the auto-hinter (see file `ftautoh.h' for more */ | |
| 826 /* information; by default it is switched off). */ | |
| 840 /* */ | 827 /* */ |
| 841 /* #define AF_CONFIG_OPTION_USE_WARPER */ | 828 #define AF_CONFIG_OPTION_USE_WARPER |
|
Lei Zhang
2015/11/05 18:29:56
This was commented out before.
Oliver Chang
2015/11/05 18:45:26
Oh, upstream had this commented out too back in 2.
Lei Zhang
2015/11/05 18:50:23
So this is just FT changing their defaults? If we
| |
| 842 | 829 |
| 843 /* */ | 830 /* */ |
| 844 | 831 |
| 845 | 832 |
| 846 /* | 833 /* |
| 847 * This macro is obsolete. Support has been removed in FreeType | 834 * This macro is obsolete. Support has been removed in FreeType |
| 848 * version 2.5. | 835 * version 2.5. |
| 849 */ | 836 */ |
| 850 /* #define FT_CONFIG_OPTION_OLD_INTERNALS */ | 837 /* #define FT_CONFIG_OPTION_OLD_INTERNALS */ |
| 851 | 838 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 890 #error "Invalid CFF darkening parameters!" | 877 #error "Invalid CFF darkening parameters!" |
| 891 #endif | 878 #endif |
| 892 | 879 |
| 893 FT_END_HEADER | 880 FT_END_HEADER |
| 894 | 881 |
| 895 | 882 |
| 896 #endif /* __FTOPTION_H__ */ | 883 #endif /* __FTOPTION_H__ */ |
| 897 | 884 |
| 898 | 885 |
| 899 /* END */ | 886 /* END */ |
| OLD | NEW |