OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* freetype.h */ | 3 /* freetype.h */ |
4 /* */ | 4 /* */ |
5 /* FreeType high-level API and common types (specification only). */ | 5 /* FreeType high-level API and common types (specification only). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2011 by */ | 7 /* Copyright 1996-2012 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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 FT_CharMap charmap; | 951 FT_CharMap charmap; |
952 | 952 |
953 /*@private begin */ | 953 /*@private begin */ |
954 | 954 |
955 FT_Driver driver; | 955 FT_Driver driver; |
956 FT_Memory memory; | 956 FT_Memory memory; |
957 FT_Stream stream; | 957 FT_Stream stream; |
958 | 958 |
959 FT_ListRec sizes_list; | 959 FT_ListRec sizes_list; |
960 | 960 |
961 FT_Generic autohint; | 961 FT_Generic autohint; /* face-specific auto-hinter data */ |
962 void* extensions; | 962 void* extensions; /* unused */ |
963 | 963 |
964 FT_Face_Internal internal; | 964 FT_Face_Internal internal; |
965 | 965 |
966 /*@private end */ | 966 /*@private end */ |
967 | 967 |
968 } FT_FaceRec; | 968 } FT_FaceRec; |
969 | 969 |
970 | 970 |
971 /*************************************************************************/ | 971 /*************************************************************************/ |
972 /* */ | 972 /* */ |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 /* alibrary :: A handle to a new library object. */ | 1661 /* alibrary :: A handle to a new library object. */ |
1662 /* */ | 1662 /* */ |
1663 /* <Return> */ | 1663 /* <Return> */ |
1664 /* FreeType error code. 0~means success. */ | 1664 /* FreeType error code. 0~means success. */ |
1665 /* */ | 1665 /* */ |
1666 /* <Note> */ | 1666 /* <Note> */ |
1667 /* In case you want to provide your own memory allocating routines, */ | 1667 /* In case you want to provide your own memory allocating routines, */ |
1668 /* use @FT_New_Library instead, followed by a call to */ | 1668 /* use @FT_New_Library instead, followed by a call to */ |
1669 /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ | 1669 /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ |
1670 /* */ | 1670 /* */ |
| 1671 /* For multi-threading applications each thread should have its own */ |
| 1672 /* FT_Library object. */ |
| 1673 /* */ |
1671 FT_EXPORT( FT_Error ) | 1674 FT_EXPORT( FT_Error ) |
1672 FT_Init_FreeType( FT_Library *alibrary ); | 1675 FT_Init_FreeType( FT_Library *alibrary ); |
1673 | 1676 |
1674 | 1677 |
1675 /*************************************************************************/ | 1678 /*************************************************************************/ |
1676 /* */ | 1679 /* */ |
1677 /* <Function> */ | 1680 /* <Function> */ |
1678 /* FT_Done_FreeType */ | 1681 /* FT_Done_FreeType */ |
1679 /* */ | 1682 /* */ |
1680 /* <Description> */ | 1683 /* <Description> */ |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 /* if the font format is recognized, or non-zero otherwise; */ | 1949 /* if the font format is recognized, or non-zero otherwise; */ |
1947 /* the function returns a more or less empty face handle in `*aface' */ | 1950 /* the function returns a more or less empty face handle in `*aface' */ |
1948 /* (if `aface' isn't NULL). The only useful field in this special */ | 1951 /* (if `aface' isn't NULL). The only useful field in this special */ |
1949 /* case is `face->num_faces' which gives the number of faces within */ | 1952 /* case is `face->num_faces' which gives the number of faces within */ |
1950 /* the font file. After examination, the returned @FT_Face structure */ | 1953 /* the font file. After examination, the returned @FT_Face structure */ |
1951 /* should be deallocated with a call to @FT_Done_Face. */ | 1954 /* should be deallocated with a call to @FT_Done_Face. */ |
1952 /* */ | 1955 /* */ |
1953 /* Each new face object created with this function also owns a */ | 1956 /* Each new face object created with this function also owns a */ |
1954 /* default @FT_Size object, accessible as `face->size'. */ | 1957 /* default @FT_Size object, accessible as `face->size'. */ |
1955 /* */ | 1958 /* */ |
| 1959 /* One @FT_Library instance can have multiple face objects, this is, */ |
| 1960 /* @FT_Open_Face and its siblings can be called multiple times using */ |
| 1961 /* the same `library' argument. */ |
| 1962 /* */ |
1956 /* See the discussion of reference counters in the description of */ | 1963 /* See the discussion of reference counters in the description of */ |
1957 /* @FT_Reference_Face. */ | 1964 /* @FT_Reference_Face. */ |
1958 /* */ | 1965 /* */ |
1959 FT_EXPORT( FT_Error ) | 1966 FT_EXPORT( FT_Error ) |
1960 FT_Open_Face( FT_Library library, | 1967 FT_Open_Face( FT_Library library, |
1961 const FT_Open_Args* args, | 1968 const FT_Open_Args* args, |
1962 FT_Long face_index, | 1969 FT_Long face_index, |
1963 FT_Face *aface ); | 1970 FT_Face *aface ); |
1964 | 1971 |
1965 | 1972 |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 * FT_LOAD_CROP_BITMAP :: | 2445 * FT_LOAD_CROP_BITMAP :: |
2439 * Indicates that the font driver should crop the loaded bitmap glyph | 2446 * Indicates that the font driver should crop the loaded bitmap glyph |
2440 * (i.e., remove all space around its black bits). Not all drivers | 2447 * (i.e., remove all space around its black bits). Not all drivers |
2441 * implement this. | 2448 * implement this. |
2442 * | 2449 * |
2443 * FT_LOAD_PEDANTIC :: | 2450 * FT_LOAD_PEDANTIC :: |
2444 * Indicates that the font driver should perform pedantic verifications | 2451 * Indicates that the font driver should perform pedantic verifications |
2445 * during glyph loading. This is mostly used to detect broken glyphs | 2452 * during glyph loading. This is mostly used to detect broken glyphs |
2446 * in fonts. By default, FreeType tries to handle broken fonts also. | 2453 * in fonts. By default, FreeType tries to handle broken fonts also. |
2447 * | 2454 * |
| 2455 * In particular, errors from the TrueType bytecode engine are not |
| 2456 * passed to the application if this flag is not set; this might |
| 2457 * result in partially hinted or distorted glyphs in case a glyph's |
| 2458 * bytecode is buggy. |
| 2459 * |
2448 * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: | 2460 * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: |
2449 * Ignored. Deprecated. | 2461 * Ignored. Deprecated. |
2450 * | 2462 * |
2451 * FT_LOAD_NO_RECURSE :: | 2463 * FT_LOAD_NO_RECURSE :: |
2452 * This flag is only used internally. It merely indicates that the | 2464 * This flag is only used internally. It merely indicates that the |
2453 * font driver should not load composite glyphs recursively. Instead, | 2465 * font driver should not load composite glyphs recursively. Instead, |
2454 * it should set the `num_subglyph' and `subglyphs' values of the | 2466 * it should set the `num_subglyph' and `subglyphs' values of the |
2455 * glyph slot accordingly, and set `glyph->format' to | 2467 * glyph slot accordingly, and set `glyph->format' to |
2456 * @FT_GLYPH_FORMAT_COMPOSITE. | 2468 * @FT_GLYPH_FORMAT_COMPOSITE. |
2457 * | 2469 * |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2490 * used at all. | 2502 * used at all. |
2491 * | 2503 * |
2492 * See the description of @FT_FACE_FLAG_TRICKY for a special exception | 2504 * See the description of @FT_FACE_FLAG_TRICKY for a special exception |
2493 * (affecting only a handful of Asian fonts). | 2505 * (affecting only a handful of Asian fonts). |
2494 * | 2506 * |
2495 * Besides deciding which hinter to use, you can also decide which | 2507 * Besides deciding which hinter to use, you can also decide which |
2496 * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. | 2508 * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. |
2497 * | 2509 * |
2498 */ | 2510 */ |
2499 #define FT_LOAD_DEFAULT 0x0 | 2511 #define FT_LOAD_DEFAULT 0x0 |
2500 #define FT_LOAD_NO_SCALE 0x1 | 2512 #define FT_LOAD_NO_SCALE ( 1L << 0 ) |
2501 #define FT_LOAD_NO_HINTING 0x2 | 2513 #define FT_LOAD_NO_HINTING ( 1L << 1 ) |
2502 #define FT_LOAD_RENDER 0x4 | 2514 #define FT_LOAD_RENDER ( 1L << 2 ) |
2503 #define FT_LOAD_NO_BITMAP 0x8 | 2515 #define FT_LOAD_NO_BITMAP ( 1L << 3 ) |
2504 #define FT_LOAD_VERTICAL_LAYOUT 0x10 | 2516 #define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) |
2505 #define FT_LOAD_FORCE_AUTOHINT 0x20 | 2517 #define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) |
2506 #define FT_LOAD_CROP_BITMAP 0x40 | 2518 #define FT_LOAD_CROP_BITMAP ( 1L << 6 ) |
2507 #define FT_LOAD_PEDANTIC 0x80 | 2519 #define FT_LOAD_PEDANTIC ( 1L << 7 ) |
2508 #define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200 | 2520 #define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) |
2509 #define FT_LOAD_NO_RECURSE 0x400 | 2521 #define FT_LOAD_NO_RECURSE ( 1L << 10 ) |
2510 #define FT_LOAD_IGNORE_TRANSFORM 0x800 | 2522 #define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) |
2511 #define FT_LOAD_MONOCHROME 0x1000 | 2523 #define FT_LOAD_MONOCHROME ( 1L << 12 ) |
2512 #define FT_LOAD_LINEAR_DESIGN 0x2000 | 2524 #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) |
2513 #define FT_LOAD_NO_AUTOHINT 0x8000U | 2525 #define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) |
2514 | 2526 |
2515 /* */ | 2527 /* */ |
2516 | 2528 |
2517 /* used internally only by certain font drivers! */ | 2529 /* used internally only by certain font drivers! */ |
2518 #define FT_LOAD_ADVANCE_ONLY 0x100 | 2530 #define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) |
2519 #define FT_LOAD_SBITS_ONLY 0x4000 | 2531 #define FT_LOAD_SBITS_ONLY ( 1L << 14 ) |
2520 | 2532 |
2521 | 2533 |
2522 /************************************************************************** | 2534 /************************************************************************** |
2523 * | 2535 * |
2524 * @enum: | 2536 * @enum: |
2525 * FT_LOAD_TARGET_XXX | 2537 * FT_LOAD_TARGET_XXX |
2526 * | 2538 * |
2527 * @description: | 2539 * @description: |
2528 * A list of values that are used to select a specific hinting algorithm | 2540 * A list of values that are used to select a specific hinting algorithm |
2529 * to use by the hinter. You should OR one of these values to your | 2541 * to use by the hinter. You should OR one of these values to your |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2862 /* FT_Get_Track_Kerning */ | 2874 /* FT_Get_Track_Kerning */ |
2863 /* */ | 2875 /* */ |
2864 /* <Description> */ | 2876 /* <Description> */ |
2865 /* Return the track kerning for a given face object at a given size. */ | 2877 /* Return the track kerning for a given face object at a given size. */ |
2866 /* */ | 2878 /* */ |
2867 /* <Input> */ | 2879 /* <Input> */ |
2868 /* face :: A handle to a source face object. */ | 2880 /* face :: A handle to a source face object. */ |
2869 /* */ | 2881 /* */ |
2870 /* point_size :: The point size in 16.16 fractional points. */ | 2882 /* point_size :: The point size in 16.16 fractional points. */ |
2871 /* */ | 2883 /* */ |
2872 /* degree :: The degree of tightness. */ | 2884 /* degree :: The degree of tightness. Increasingly negative */ |
| 2885 /* values represent tighter track kerning, while */ |
| 2886 /* increasingly positive values represent looser track */ |
| 2887 /* kerning. Value zero means no track kerning. */ |
2873 /* */ | 2888 /* */ |
2874 /* <Output> */ | 2889 /* <Output> */ |
2875 /* akerning :: The kerning in 16.16 fractional points. */ | 2890 /* akerning :: The kerning in 16.16 fractional points, to be */ |
| 2891 /* uniformly applied between all glyphs. */ |
2876 /* */ | 2892 /* */ |
2877 /* <Return> */ | 2893 /* <Return> */ |
2878 /* FreeType error code. 0~means success. */ | 2894 /* FreeType error code. 0~means success. */ |
2879 /* */ | 2895 /* */ |
| 2896 /* <Note> */ |
| 2897 /* Currently, only the Type~1 font driver supports track kerning, */ |
| 2898 /* using data from AFM files (if attached with @FT_Attach_File or */ |
| 2899 /* @FT_Attach_Stream). */ |
| 2900 /* */ |
| 2901 /* Only very few AFM files come with track kerning data; please refer */ |
| 2902 /* to the Adobe's AFM specification for more details. */ |
| 2903 /* */ |
2880 FT_EXPORT( FT_Error ) | 2904 FT_EXPORT( FT_Error ) |
2881 FT_Get_Track_Kerning( FT_Face face, | 2905 FT_Get_Track_Kerning( FT_Face face, |
2882 FT_Fixed point_size, | 2906 FT_Fixed point_size, |
2883 FT_Int degree, | 2907 FT_Int degree, |
2884 FT_Fixed* akerning ); | 2908 FT_Fixed* akerning ); |
2885 | 2909 |
2886 | 2910 |
2887 /*************************************************************************/ | 2911 /*************************************************************************/ |
2888 /* */ | 2912 /* */ |
2889 /* <Function> */ | 2913 /* <Function> */ |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3803 * FREETYPE_PATCH :: The patch level. | 3827 * FREETYPE_PATCH :: The patch level. |
3804 * | 3828 * |
3805 * @note: | 3829 * @note: |
3806 * The version number of FreeType if built as a dynamic link library | 3830 * The version number of FreeType if built as a dynamic link library |
3807 * with the `libtool' package is _not_ controlled by these three | 3831 * with the `libtool' package is _not_ controlled by these three |
3808 * macros. | 3832 * macros. |
3809 * | 3833 * |
3810 */ | 3834 */ |
3811 #define FREETYPE_MAJOR 2 | 3835 #define FREETYPE_MAJOR 2 |
3812 #define FREETYPE_MINOR 4 | 3836 #define FREETYPE_MINOR 4 |
3813 #define FREETYPE_PATCH 6 | 3837 #define FREETYPE_PATCH 9 |
3814 | 3838 |
3815 | 3839 |
3816 /*************************************************************************/ | 3840 /*************************************************************************/ |
3817 /* */ | 3841 /* */ |
3818 /* <Function> */ | 3842 /* <Function> */ |
3819 /* FT_Library_Version */ | 3843 /* FT_Library_Version */ |
3820 /* */ | 3844 /* */ |
3821 /* <Description> */ | 3845 /* <Description> */ |
3822 /* Return the version of the FreeType library being used. This is */ | 3846 /* Return the version of the FreeType library being used. This is */ |
3823 /* useful when dynamically linking to the library, since one cannot */ | 3847 /* useful when dynamically linking to the library, since one cannot */ |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3912 | 3936 |
3913 /* */ | 3937 /* */ |
3914 | 3938 |
3915 | 3939 |
3916 FT_END_HEADER | 3940 FT_END_HEADER |
3917 | 3941 |
3918 #endif /* __FREETYPE_H__ */ | 3942 #endif /* __FREETYPE_H__ */ |
3919 | 3943 |
3920 | 3944 |
3921 /* END */ | 3945 /* END */ |
OLD | NEW |