Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: third_party/freetype/include/freetype/freetype.h

Issue 1413673003: Update bundled freetype to 2.6.1 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: DEPS for corpus Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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-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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 /* FT_Library */ 387 /* FT_Library */
388 /* */ 388 /* */
389 /* <Description> */ 389 /* <Description> */
390 /* A handle to a FreeType library instance. Each `library' is */ 390 /* A handle to a FreeType library instance. Each `library' is */
391 /* completely independent from the others; it is the `root' of a set */ 391 /* completely independent from the others; it is the `root' of a set */
392 /* of objects like fonts, faces, sizes, etc. */ 392 /* of objects like fonts, faces, sizes, etc. */
393 /* */ 393 /* */
394 /* It also embeds a memory manager (see @FT_Memory), as well as a */ 394 /* It also embeds a memory manager (see @FT_Memory), as well as a */
395 /* scan-line converter object (see @FT_Raster). */ 395 /* scan-line converter object (see @FT_Raster). */
396 /* */ 396 /* */
397 /* In multi-threaded applications, make sure that the same FT_Library */ 397 /* In multi-threaded applications it is easiest to use one */
398 /* object or any of its children doesn't get accessed in parallel. */ 398 /* `FT_Library' object per thread. In case this is too cumbersome, */
399 /* a single `FT_Library' object across threads is possible also */
400 /* (since FreeType version 2.5.6), as long as a mutex lock is used */
401 /* around @FT_New_Face and @FT_Done_Face. */
399 /* */ 402 /* */
400 /* <Note> */ 403 /* <Note> */
401 /* Library objects are normally created by @FT_Init_FreeType, and */ 404 /* Library objects are normally created by @FT_Init_FreeType, and */
402 /* destroyed with @FT_Done_FreeType. If you need reference-counting */ 405 /* destroyed with @FT_Done_FreeType. If you need reference-counting */
403 /* (cf. @FT_Reference_Library), use @FT_New_Library and */ 406 /* (cf. @FT_Reference_Library), use @FT_New_Library and */
404 /* @FT_Done_Library. */ 407 /* @FT_Done_Library. */
405 /* */ 408 /* */
406 typedef struct FT_LibraryRec_ *FT_Library; 409 typedef struct FT_LibraryRec_ *FT_Library;
407 410
408 411
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 /* */ 473 /* */
471 /* <Note> */ 474 /* <Note> */
472 /* Each face object also owns a single @FT_GlyphSlot object, as well */ 475 /* Each face object also owns a single @FT_GlyphSlot object, as well */
473 /* as one or more @FT_Size objects. */ 476 /* as one or more @FT_Size objects. */
474 /* */ 477 /* */
475 /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ 478 /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */
476 /* a given filepathname or a custom input stream. */ 479 /* a given filepathname or a custom input stream. */
477 /* */ 480 /* */
478 /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ 481 /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
479 /* */ 482 /* */
483 /* An `FT_Face' object can only be safely used from one thread at a */
484 /* time. Similarly, creation and destruction of `FT_Face' with the */
485 /* same @FT_Library object can only be done from one thread at a */
486 /* time. On the other hand, functions like @FT_Load_Glyph and its */
487 /* siblings are thread-safe and do not need the lock to be held as */
488 /* long as the same `FT_Face' object is not used from multiple */
489 /* threads at the same time. */
490 /* */
480 /* <Also> */ 491 /* <Also> */
481 /* See @FT_FaceRec for the publicly accessible fields of a given face */ 492 /* See @FT_FaceRec for the publicly accessible fields of a given face */
482 /* object. */ 493 /* object. */
483 /* */ 494 /* */
484 typedef struct FT_FaceRec_* FT_Face; 495 typedef struct FT_FaceRec_* FT_Face;
485 496
486 497
487 /*************************************************************************/ 498 /*************************************************************************/
488 /* */ 499 /* */
489 /* <Type> */ 500 /* <Type> */
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 /* all versions of the Unicode repertoire, including ASCII and */ 635 /* all versions of the Unicode repertoire, including ASCII and */
625 /* Latin-1. Most fonts include a Unicode charmap, but not all */ 636 /* Latin-1. Most fonts include a Unicode charmap, but not all */
626 /* of them. */ 637 /* of them. */
627 /* */ 638 /* */
628 /* For example, if you want to access Unicode value U+1F028 (and */ 639 /* For example, if you want to access Unicode value U+1F028 (and */
629 /* the font contains it), use value 0x1F028 as the input value for */ 640 /* the font contains it), use value 0x1F028 as the input value for */
630 /* @FT_Get_Char_Index. */ 641 /* @FT_Get_Char_Index. */
631 /* */ 642 /* */
632 /* FT_ENCODING_MS_SYMBOL :: */ 643 /* FT_ENCODING_MS_SYMBOL :: */
633 /* Corresponds to the Microsoft Symbol encoding, used to encode */ 644 /* Corresponds to the Microsoft Symbol encoding, used to encode */
634 /* mathematical symbols in the 32..255 character code range. For */ 645 /* mathematical symbols and wingdings. For more information, see */
635 /* more information, see */ 646 /* `http://www.microsoft.com/typography/otspec/recom.htm', */
636 /* `http://www.kostis.net/charsets/symbol.htm'. */ 647 /* `http://www.kostis.net/charsets/symbol.htm', and */
648 /* `http://www.kostis.net/charsets/wingding.htm'. */
649 /* */
650 /* This encoding uses character codes from the PUA (Private Unicode */
651 /* Area) in the range U+F020-U+F0FF. */
637 /* */ 652 /* */
638 /* FT_ENCODING_SJIS :: */ 653 /* FT_ENCODING_SJIS :: */
639 /* Corresponds to Japanese SJIS encoding. More info at */ 654 /* Corresponds to Japanese SJIS encoding. More info at */
640 /* at `http://en.wikipedia.org/wiki/Shift_JIS'. */ 655 /* at `http://en.wikipedia.org/wiki/Shift_JIS'. */
641 /* See note on multi-byte encodings below. */ 656 /* See note on multi-byte encodings below. */
642 /* */ 657 /* */
643 /* FT_ENCODING_GB2312 :: */ 658 /* FT_ENCODING_GB2312 :: */
644 /* Corresponds to an encoding system for Simplified Chinese as used */ 659 /* Corresponds to an encoding system for Simplified Chinese as used */
645 /* used in mainland China. */ 660 /* used in mainland China. */
646 /* */ 661 /* */
647 /* FT_ENCODING_BIG5 :: */ 662 /* FT_ENCODING_BIG5 :: */
648 /* Corresponds to an encoding system for Traditional Chinese as */ 663 /* Corresponds to an encoding system for Traditional Chinese as */
649 /* used in Taiwan and Hong Kong. */ 664 /* used in Taiwan and Hong Kong. */
650 /* */ 665 /* */
651 /* FT_ENCODING_WANSUNG :: */ 666 /* FT_ENCODING_WANSUNG :: */
652 /* Corresponds to the Korean encoding system known as Wansung. */ 667 /* Corresponds to the Korean encoding system known as Wansung. */
653 /* For more information see */ 668 /* For more information see */
654 /* `http://msdn.microsoft.com/en-US/goglobal/cc305154'. */ 669 /* `https://msdn.microsoft.com/en-US/goglobal/cc305154'. */
655 /* */ 670 /* */
656 /* FT_ENCODING_JOHAB :: */ 671 /* FT_ENCODING_JOHAB :: */
657 /* The Korean standard character set (KS~C 5601-1992), which */ 672 /* The Korean standard character set (KS~C 5601-1992), which */
658 /* corresponds to MS Windows code page 1361. This character set */ 673 /* corresponds to MS Windows code page 1361. This character set */
659 /* includes all possible Hangeul character combinations. */ 674 /* includes all possible Hangeul character combinations. */
660 /* */ 675 /* */
661 /* FT_ENCODING_ADOBE_LATIN_1 :: */ 676 /* FT_ENCODING_ADOBE_LATIN_1 :: */
662 /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ 677 /* Corresponds to a Latin-1 encoding as defined in a Type~1 */
663 /* PostScript font. It is limited to 256 character codes. */ 678 /* PostScript font. It is limited to 256 character codes. */
664 /* */ 679 /* */
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 /* */ 869 /* */
855 /* <Description> */ 870 /* <Description> */
856 /* FreeType root face class structure. A face object models a */ 871 /* FreeType root face class structure. A face object models a */
857 /* typeface in a font file. */ 872 /* typeface in a font file. */
858 /* */ 873 /* */
859 /* <Fields> */ 874 /* <Fields> */
860 /* num_faces :: The number of faces in the font file. Some */ 875 /* num_faces :: The number of faces in the font file. Some */
861 /* font formats can have multiple faces in */ 876 /* font formats can have multiple faces in */
862 /* a font file. */ 877 /* a font file. */
863 /* */ 878 /* */
864 /* face_index :: The index of the face in the font file. It */ 879 /* face_index :: This field holds two different values. */
865 /* is set to~0 if there is only one face in */ 880 /* Bits 0-15 are the index of the face in the */
881 /* font file (starting with value~0). They */
882 /* are set to~0 if there is only one face in */
866 /* the font file. */ 883 /* the font file. */
867 /* */ 884 /* */
885 /* Bits 16-30 are relevant to GX variation */
886 /* fonts only, holding the named instance */
887 /* index for the current face index (starting */
888 /* with value~1; value~0 indicates font access */
889 /* without GX variation data). For non-GX */
890 /* fonts, bits 16-30 are ignored. If we have */
891 /* the third named instance of face~4, say, */
892 /* `face_index' is set to 0x00030004. */
893 /* */
894 /* Bit 31 is always zero (this is, */
895 /* `face_index' is always a positive value). */
896 /* */
868 /* face_flags :: A set of bit flags that give important */ 897 /* face_flags :: A set of bit flags that give important */
869 /* information about the face; see */ 898 /* information about the face; see */
870 /* @FT_FACE_FLAG_XXX for the details. */ 899 /* @FT_FACE_FLAG_XXX for the details. */
871 /* */ 900 /* */
872 /* style_flags :: A set of bit flags indicating the style of */ 901 /* style_flags :: The lower 16~bits contain a set of bit */
873 /* the face; see @FT_STYLE_FLAG_XXX for the */ 902 /* flags indicating the style of the face; see */
874 /* details. */ 903 /* @FT_STYLE_FLAG_XXX for the details. Bits */
904 /* 16-30 hold the number of named instances */
905 /* available for the current face if we have a */
906 /* GX variation (sub)font. Bit 31 is always */
907 /* zero (this is, `style_flags' is always a */
908 /* positive value). */
875 /* */ 909 /* */
876 /* num_glyphs :: The number of glyphs in the face. If the */ 910 /* num_glyphs :: The number of glyphs in the face. If the */
877 /* face is scalable and has sbits (see */ 911 /* face is scalable and has sbits (see */
878 /* `num_fixed_sizes'), it is set to the number */ 912 /* `num_fixed_sizes'), it is set to the number */
879 /* of outline glyphs. */ 913 /* of outline glyphs. */
880 /* */ 914 /* */
881 /* For CID-keyed fonts, this value gives the */ 915 /* For CID-keyed fonts, this value gives the */
882 /* highest CID used in the font. */ 916 /* highest CID used in the font. */
883 /* */ 917 /* */
884 /* family_name :: The face's family name. This is an ASCII */ 918 /* family_name :: The face's family name. This is an ASCII */
885 /* string, usually in English, that describes */ 919 /* string, usually in English, that describes */
886 /* the typeface's family (like `Times New */ 920 /* the typeface's family (like `Times New */
887 /* Roman', `Bodoni', `Garamond', etc). This */ 921 /* Roman', `Bodoni', `Garamond', etc). This */
888 /* is a least common denominator used to list */ 922 /* is a least common denominator used to list */
889 /* fonts. Some formats (TrueType & OpenType) */ 923 /* fonts. Some formats (TrueType & OpenType) */
890 /* provide localized and Unicode versions of */ 924 /* provide localized and Unicode versions of */
891 /* this string. Applications should use the */ 925 /* this string. Applications should use the */
892 /* format specific interface to access them. */ 926 /* format specific interface to access them. */
893 /* Can be NULL (e.g., in fonts embedded in a */ 927 /* Can be NULL (e.g., in fonts embedded in a */
894 /* PDF file). */ 928 /* PDF file). */
895 /* */ 929 /* */
930 /* In case the font doesn't provide a specific */
931 /* family name entry, FreeType tries to */
932 /* synthesize one, deriving it from other name */
933 /* entries. */
934 /* */
896 /* style_name :: The face's style name. This is an ASCII */ 935 /* style_name :: The face's style name. This is an ASCII */
897 /* string, usually in English, that describes */ 936 /* string, usually in English, that describes */
898 /* the typeface's style (like `Italic', */ 937 /* the typeface's style (like `Italic', */
899 /* `Bold', `Condensed', etc). Not all font */ 938 /* `Bold', `Condensed', etc). Not all font */
900 /* formats provide a style name, so this field */ 939 /* formats provide a style name, so this field */
901 /* is optional, and can be set to NULL. As */ 940 /* is optional, and can be set to NULL. As */
902 /* for `family_name', some formats provide */ 941 /* for `family_name', some formats provide */
903 /* localized and Unicode versions of this */ 942 /* localized and Unicode versions of this */
904 /* string. Applications should use the format */ 943 /* string. Applications should use the format */
905 /* specific interface to access them. */ 944 /* specific interface to access them. */
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 /* way (using contiguous indices); the `CID-ness' isn't visible to */ 1172 /* way (using contiguous indices); the `CID-ness' isn't visible to */
1134 /* the application. */ 1173 /* the application. */
1135 /* */ 1174 /* */
1136 /* FT_FACE_FLAG_TRICKY :: */ 1175 /* FT_FACE_FLAG_TRICKY :: */
1137 /* Set if the font is `tricky', this is, it always needs the */ 1176 /* Set if the font is `tricky', this is, it always needs the */
1138 /* font format's native hinting engine to get a reasonable result. */ 1177 /* font format's native hinting engine to get a reasonable result. */
1139 /* A typical example is the Chinese font `mingli.ttf' that uses */ 1178 /* A typical example is the Chinese font `mingli.ttf' that uses */
1140 /* TrueType bytecode instructions to move and scale all of its */ 1179 /* TrueType bytecode instructions to move and scale all of its */
1141 /* subglyphs. */ 1180 /* subglyphs. */
1142 /* */ 1181 /* */
1143 /* It is not possible to autohint such fonts using */ 1182 /* It is not possible to auto-hint such fonts using */
1144 /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ 1183 /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
1145 /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ 1184 /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */
1146 /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ 1185 /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
1147 /* probably never want this except for demonstration purposes. */ 1186 /* probably never want this except for demonstration purposes. */
1148 /* */ 1187 /* */
1149 /* Currently, there are about a dozen TrueType fonts in the list of */ 1188 /* Currently, there are about a dozen TrueType fonts in the list of */
1150 /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ 1189 /* tricky fonts; they are hard-coded in file `ttobjs.c'. */
1151 /* */ 1190 /* */
1152 /* FT_FACE_FLAG_COLOR :: */ 1191 /* FT_FACE_FLAG_COLOR :: */
1153 /* Set if the font has color glyph tables. To access color glyphs */ 1192 /* Set if the font has color glyph tables. To access color glyphs */
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 #define FT_HAS_COLOR( face ) \ 1404 #define FT_HAS_COLOR( face ) \
1366 ( face->face_flags & FT_FACE_FLAG_COLOR ) 1405 ( face->face_flags & FT_FACE_FLAG_COLOR )
1367 1406
1368 1407
1369 /*************************************************************************/ 1408 /*************************************************************************/
1370 /* */ 1409 /* */
1371 /* <Const> */ 1410 /* <Const> */
1372 /* FT_STYLE_FLAG_XXX */ 1411 /* FT_STYLE_FLAG_XXX */
1373 /* */ 1412 /* */
1374 /* <Description> */ 1413 /* <Description> */
1375 /* A list of bit-flags used to indicate the style of a given face. */ 1414 /* A list of bit flags used to indicate the style of a given face. */
1376 /* These are used in the `style_flags' field of @FT_FaceRec. */ 1415 /* These are used in the `style_flags' field of @FT_FaceRec. */
1377 /* */ 1416 /* */
1378 /* <Values> */ 1417 /* <Values> */
1379 /* FT_STYLE_FLAG_ITALIC :: */ 1418 /* FT_STYLE_FLAG_ITALIC :: */
1380 /* Indicates that a given face style is italic or oblique. */ 1419 /* Indicates that a given face style is italic or oblique. */
1381 /* */ 1420 /* */
1382 /* FT_STYLE_FLAG_BOLD :: */ 1421 /* FT_STYLE_FLAG_BOLD :: */
1383 /* Indicates that a given face is bold. */ 1422 /* Indicates that a given face is bold. */
1384 /* */ 1423 /* */
1385 /* <Note> */ 1424 /* <Note> */
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 /* */ 1681 /* */
1643 /* control_len :: This is the length in bytes of the control */ 1682 /* control_len :: This is the length in bytes of the control */
1644 /* data. */ 1683 /* data. */
1645 /* */ 1684 /* */
1646 /* other :: Really wicked formats can use this pointer to */ 1685 /* other :: Really wicked formats can use this pointer to */
1647 /* present their own glyph image to client */ 1686 /* present their own glyph image to client */
1648 /* applications. Note that the application */ 1687 /* applications. Note that the application */
1649 /* needs to know about the image format. */ 1688 /* needs to know about the image format. */
1650 /* */ 1689 /* */
1651 /* lsb_delta :: The difference between hinted and unhinted */ 1690 /* lsb_delta :: The difference between hinted and unhinted */
1652 /* left side bearing while autohinting is */ 1691 /* left side bearing while auto-hinting is */
1653 /* active. Zero otherwise. */ 1692 /* active. Zero otherwise. */
1654 /* */ 1693 /* */
1655 /* rsb_delta :: The difference between hinted and unhinted */ 1694 /* rsb_delta :: The difference between hinted and unhinted */
1656 /* right side bearing while autohinting is */ 1695 /* right side bearing while auto-hinting is */
1657 /* active. Zero otherwise. */ 1696 /* active. Zero otherwise. */
1658 /* */ 1697 /* */
1659 /* <Note> */ 1698 /* <Note> */
1660 /* If @FT_Load_Glyph is called with default flags (see */ 1699 /* If @FT_Load_Glyph is called with default flags (see */
1661 /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ 1700 /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */
1662 /* its native format (e.g., an outline glyph for TrueType and Type~1 */ 1701 /* its native format (e.g., an outline glyph for TrueType and Type~1 */
1663 /* formats). */ 1702 /* formats). */
1664 /* */ 1703 /* */
1665 /* This image can later be converted into a bitmap by calling */ 1704 /* This image can later be converted into a bitmap by calling */
1666 /* @FT_Render_Glyph. This function finds the current renderer for */ 1705 /* @FT_Render_Glyph. This function finds the current renderer for */
1667 /* the native image's format, then invokes it. */ 1706 /* the native image's format, then invokes it. */
1668 /* */ 1707 /* */
1669 /* The renderer is in charge of transforming the native image through */ 1708 /* The renderer is in charge of transforming the native image through */
1670 /* the slot's face transformation fields, then converting it into a */ 1709 /* the slot's face transformation fields, then converting it into a */
1671 /* bitmap that is returned in `slot->bitmap'. */ 1710 /* bitmap that is returned in `slot->bitmap'. */
1672 /* */ 1711 /* */
1673 /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ 1712 /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
1674 /* to specify the position of the bitmap relative to the current pen */ 1713 /* to specify the position of the bitmap relative to the current pen */
1675 /* position (e.g., coordinates (0,0) on the baseline). Of course, */ 1714 /* position (e.g., coordinates (0,0) on the baseline). Of course, */
1676 /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ 1715 /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
1677 /* */ 1716 /* */
1678 /* <Note> */ 1717 /* <Note> */
1679 /* Here a small pseudo code fragment that shows how to use */ 1718 /* Here is a small pseudo code fragment that shows how to use */
1680 /* `lsb_delta' and `rsb_delta': */ 1719 /* `lsb_delta' and `rsb_delta': */
1681 /* */ 1720 /* */
1682 /* { */ 1721 /* { */
1683 /* FT_Pos origin_x = 0; */ 1722 /* FT_Pos origin_x = 0; */
1684 /* FT_Pos prev_rsb_delta = 0; */ 1723 /* FT_Pos prev_rsb_delta = 0; */
1685 /* */ 1724 /* */
1686 /* */ 1725 /* */
1687 /* for all glyphs do */ 1726 /* for all glyphs do */
1688 /* <compute kern between current and previous glyph and add it to */ 1727 /* <compute kern between current and previous glyph and add it to */
1689 /* `origin_x'> */ 1728 /* `origin_x'> */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 /* alibrary :: A handle to a new library object. */ 1801 /* alibrary :: A handle to a new library object. */
1763 /* */ 1802 /* */
1764 /* <Return> */ 1803 /* <Return> */
1765 /* FreeType error code. 0~means success. */ 1804 /* FreeType error code. 0~means success. */
1766 /* */ 1805 /* */
1767 /* <Note> */ 1806 /* <Note> */
1768 /* In case you want to provide your own memory allocating routines, */ 1807 /* In case you want to provide your own memory allocating routines, */
1769 /* use @FT_New_Library instead, followed by a call to */ 1808 /* use @FT_New_Library instead, followed by a call to */
1770 /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ 1809 /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */
1771 /* */ 1810 /* */
1772 /* For multi-threading applications each thread should have its own */ 1811 /* See the documentation of @FT_Library and @FT_Face for */
1773 /* FT_Library object. */ 1812 /* multi-threading issues. */
1774 /* */ 1813 /* */
1775 /* If you need reference-counting (cf. @FT_Reference_Library), use */ 1814 /* If you need reference-counting (cf. @FT_Reference_Library), use */
1776 /* @FT_New_Library and @FT_Done_Library. */ 1815 /* @FT_New_Library and @FT_Done_Library. */
1777 /* */ 1816 /* */
1778 FT_EXPORT( FT_Error ) 1817 FT_EXPORT( FT_Error )
1779 FT_Init_FreeType( FT_Library *alibrary ); 1818 FT_Init_FreeType( FT_Library *alibrary );
1780 1819
1781 1820
1782 /*************************************************************************/ 1821 /*************************************************************************/
1783 /* */ 1822 /* */
(...skipping 13 matching lines...) Expand all
1797 FT_EXPORT( FT_Error ) 1836 FT_EXPORT( FT_Error )
1798 FT_Done_FreeType( FT_Library library ); 1837 FT_Done_FreeType( FT_Library library );
1799 1838
1800 1839
1801 /*************************************************************************/ 1840 /*************************************************************************/
1802 /* */ 1841 /* */
1803 /* <Enum> */ 1842 /* <Enum> */
1804 /* FT_OPEN_XXX */ 1843 /* FT_OPEN_XXX */
1805 /* */ 1844 /* */
1806 /* <Description> */ 1845 /* <Description> */
1807 /* A list of bit-field constants used within the `flags' field of the */ 1846 /* A list of bit field constants used within the `flags' field of the */
1808 /* @FT_Open_Args structure. */ 1847 /* @FT_Open_Args structure. */
1809 /* */ 1848 /* */
1810 /* <Values> */ 1849 /* <Values> */
1811 /* FT_OPEN_MEMORY :: This is a memory-based stream. */ 1850 /* FT_OPEN_MEMORY :: This is a memory-based stream. */
1812 /* */ 1851 /* */
1813 /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ 1852 /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */
1814 /* */ 1853 /* */
1815 /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ 1854 /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */
1816 /* name. */ 1855 /* name. */
1817 /* */ 1856 /* */
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 /* */ 1983 /* */
1945 /* <Description> */ 1984 /* <Description> */
1946 /* This function calls @FT_Open_Face to open a font by its pathname. */ 1985 /* This function calls @FT_Open_Face to open a font by its pathname. */
1947 /* */ 1986 /* */
1948 /* <InOut> */ 1987 /* <InOut> */
1949 /* library :: A handle to the library resource. */ 1988 /* library :: A handle to the library resource. */
1950 /* */ 1989 /* */
1951 /* <Input> */ 1990 /* <Input> */
1952 /* pathname :: A path to the font file. */ 1991 /* pathname :: A path to the font file. */
1953 /* */ 1992 /* */
1954 /* face_index :: The index of the face within the font. The first */ 1993 /* face_index :: See @FT_Open_Face for a detailed description of this */
1955 /* face has index~0. */ 1994 /* parameter. */
1956 /* */ 1995 /* */
1957 /* <Output> */ 1996 /* <Output> */
1958 /* aface :: A handle to a new face object. If `face_index' is */ 1997 /* aface :: A handle to a new face object. If `face_index' is */
1959 /* greater than or equal to zero, it must be non-NULL. */ 1998 /* greater than or equal to zero, it must be non-NULL. */
1960 /* See @FT_Open_Face for more details. */
1961 /* */ 1999 /* */
1962 /* <Return> */ 2000 /* <Return> */
1963 /* FreeType error code. 0~means success. */ 2001 /* FreeType error code. 0~means success. */
1964 /* */ 2002 /* */
1965 /* <Note> */ 2003 /* <Note> */
1966 /* Use @FT_Done_Face to destroy the created @FT_Face object (along */ 2004 /* Use @FT_Done_Face to destroy the created @FT_Face object (along */
1967 /* with its slot and sizes). */ 2005 /* with its slot and sizes). */
1968 /* */ 2006 /* */
1969 FT_EXPORT( FT_Error ) 2007 FT_EXPORT( FT_Error )
1970 FT_New_Face( FT_Library library, 2008 FT_New_Face( FT_Library library,
(...skipping 12 matching lines...) Expand all
1983 /* loaded into memory. */ 2021 /* loaded into memory. */
1984 /* */ 2022 /* */
1985 /* <InOut> */ 2023 /* <InOut> */
1986 /* library :: A handle to the library resource. */ 2024 /* library :: A handle to the library resource. */
1987 /* */ 2025 /* */
1988 /* <Input> */ 2026 /* <Input> */
1989 /* file_base :: A pointer to the beginning of the font data. */ 2027 /* file_base :: A pointer to the beginning of the font data. */
1990 /* */ 2028 /* */
1991 /* file_size :: The size of the memory chunk used by the font data. */ 2029 /* file_size :: The size of the memory chunk used by the font data. */
1992 /* */ 2030 /* */
1993 /* face_index :: The index of the face within the font. The first */ 2031 /* face_index :: See @FT_Open_Face for a detailed description of this */
1994 /* face has index~0. */ 2032 /* parameter. */
1995 /* */ 2033 /* */
1996 /* <Output> */ 2034 /* <Output> */
1997 /* aface :: A handle to a new face object. If `face_index' is */ 2035 /* aface :: A handle to a new face object. If `face_index' is */
1998 /* greater than or equal to zero, it must be non-NULL. */ 2036 /* greater than or equal to zero, it must be non-NULL. */
1999 /* See @FT_Open_Face for more details. */
2000 /* */ 2037 /* */
2001 /* <Return> */ 2038 /* <Return> */
2002 /* FreeType error code. 0~means success. */ 2039 /* FreeType error code. 0~means success. */
2003 /* */ 2040 /* */
2004 /* <Note> */ 2041 /* <Note> */
2005 /* You must not deallocate the memory before calling @FT_Done_Face. */ 2042 /* You must not deallocate the memory before calling @FT_Done_Face. */
2006 /* */ 2043 /* */
2007 FT_EXPORT( FT_Error ) 2044 FT_EXPORT( FT_Error )
2008 FT_New_Memory_Face( FT_Library library, 2045 FT_New_Memory_Face( FT_Library library,
2009 const FT_Byte* file_base, 2046 const FT_Byte* file_base,
(...skipping 11 matching lines...) Expand all
2021 /* Create a face object from a given resource described by */ 2058 /* Create a face object from a given resource described by */
2022 /* @FT_Open_Args. */ 2059 /* @FT_Open_Args. */
2023 /* */ 2060 /* */
2024 /* <InOut> */ 2061 /* <InOut> */
2025 /* library :: A handle to the library resource. */ 2062 /* library :: A handle to the library resource. */
2026 /* */ 2063 /* */
2027 /* <Input> */ 2064 /* <Input> */
2028 /* args :: A pointer to an `FT_Open_Args' structure that must */ 2065 /* args :: A pointer to an `FT_Open_Args' structure that must */
2029 /* be filled by the caller. */ 2066 /* be filled by the caller. */
2030 /* */ 2067 /* */
2031 /* face_index :: The index of the face within the font. The first */ 2068 /* face_index :: This field holds two different values. Bits 0-15 */
2032 /* face has index~0. */ 2069 /* are the index of the face in the font file (starting */
2070 /* with value~0). Set it to~0 if there is only one */
2071 /* face in the font file. */
2072 /* */
2073 /* Bits 16-30 are relevant to GX variation fonts only, */
2074 /* specifying the named instance index for the current */
2075 /* face index (starting with value~1; value~0 makes */
2076 /* FreeType ignore named instances). For non-GX fonts, */
2077 /* bits 16-30 are ignored. Assuming that you want to */
2078 /* access the third named instance in face~4, */
2079 /* `face_index' should be set to 0x00030004. If you */
2080 /* want to access face~4 without GX variation handling, */
2081 /* simply set `face_index' to value~4. */
2082 /* */
2083 /* FT_Open_Face and its siblings can be used to quickly */
2084 /* check whether the font format of a given font */
2085 /* resource is supported by FreeType. In general, if */
2086 /* the `face_index' argument is negative, the */
2087 /* function's return value is~0 if the font format is */
2088 /* recognized, or non-zero otherwise. The function */
2089 /* allocates a more or less empty face handle in */
2090 /* `*aface' (if `aface' isn't NULL); the only two */
2091 /* useful fields in this special case are */
2092 /* `face->num_faces' and `face->style_flags'. For any */
2093 /* negative value of `face_index', `face->num_faces' */
2094 /* gives the number of faces within the font file. For */
2095 /* the negative value `-(N+1)' (with `N' a 16-bit */
2096 /* value), bits 16-30 in `face->style_flags' give the */
2097 /* number of named instances in face `N' if we have a */
2098 /* GX variation font (or zero otherwise). After */
2099 /* examination, the returned @FT_Face structure should */
2100 /* be deallocated with a call to @FT_Done_Face. */
2033 /* */ 2101 /* */
2034 /* <Output> */ 2102 /* <Output> */
2035 /* aface :: A handle to a new face object. If `face_index' is */ 2103 /* aface :: A handle to a new face object. If `face_index' is */
2036 /* greater than or equal to zero, it must be non-NULL. */ 2104 /* greater than or equal to zero, it must be non-NULL. */
2037 /* See note below. */
2038 /* */ 2105 /* */
2039 /* <Return> */ 2106 /* <Return> */
2040 /* FreeType error code. 0~means success. */ 2107 /* FreeType error code. 0~means success. */
2041 /* */ 2108 /* */
2042 /* <Note> */ 2109 /* <Note> */
2043 /* Unlike FreeType 1.x, this function automatically creates a glyph */ 2110 /* Unlike FreeType 1.x, this function automatically creates a glyph */
2044 /* slot for the face object that can be accessed directly through */ 2111 /* slot for the face object that can be accessed directly through */
2045 /* `face->glyph'. */ 2112 /* `face->glyph'. */
2046 /* */ 2113 /* */
2047 /* FT_Open_Face can be used to quickly check whether the font */
2048 /* format of a given font resource is supported by FreeType. If the */
2049 /* `face_index' field is negative, the function's return value is~0 */
2050 /* if the font format is recognized, or non-zero otherwise; */
2051 /* the function returns a more or less empty face handle in `*aface' */
2052 /* (if `aface' isn't NULL). The only useful field in this special */
2053 /* case is `face->num_faces' that gives the number of faces within */
2054 /* the font file. After examination, the returned @FT_Face structure */
2055 /* should be deallocated with a call to @FT_Done_Face. */
2056 /* */
2057 /* Each new face object created with this function also owns a */ 2114 /* Each new face object created with this function also owns a */
2058 /* default @FT_Size object, accessible as `face->size'. */ 2115 /* default @FT_Size object, accessible as `face->size'. */
2059 /* */ 2116 /* */
2060 /* One @FT_Library instance can have multiple face objects, this is, */ 2117 /* One @FT_Library instance can have multiple face objects, this is, */
2061 /* @FT_Open_Face and its siblings can be called multiple times using */ 2118 /* @FT_Open_Face and its siblings can be called multiple times using */
2062 /* the same `library' argument. */ 2119 /* the same `library' argument. */
2063 /* */ 2120 /* */
2064 /* See the discussion of reference counters in the description of */ 2121 /* See the discussion of reference counters in the description of */
2065 /* @FT_Reference_Face. */ 2122 /* @FT_Reference_Face. */
2066 /* */ 2123 /* */
2124 /* To loop over all faces, use code similar to the following snippet */
2125 /* (omitting the error handling). */
2126 /* */
2127 /* { */
2128 /* ... */
2129 /* FT_Face face; */
2130 /* FT_Long i, num_faces; */
2131 /* */
2132 /* */
2133 /* error = FT_Open_Face( library, args, -1, &face ); */
2134 /* if ( error ) { ... } */
2135 /* */
2136 /* num_faces = face->num_faces; */
2137 /* FT_Done_Face( face ); */
2138 /* */
2139 /* for ( i = 0; i < num_faces; i++ ) */
2140 /* { */
2141 /* ... */
2142 /* error = FT_Open_Face( library, args, i, &face ); */
2143 /* ... */
2144 /* FT_Done_Face( face ); */
2145 /* ... */
2146 /* } */
2147 /* } */
2148 /* */
2149 /* To loop over all valid values for `face_index', use something */
2150 /* similar to the following snippet, again without error handling. */
2151 /* The code accesses all faces immediately (thus only a single call */
2152 /* of `FT_Open_Face' within the do-loop), with and without named */
2153 /* instances. */
2154 /* */
2155 /* { */
2156 /* ... */
2157 /* FT_Face face; */
2158 /* */
2159 /* FT_Long num_faces = 0; */
2160 /* FT_Long num_instances = 0; */
2161 /* */
2162 /* FT_Long face_idx = 0; */
2163 /* FT_Long instance_idx = 0; */
2164 /* */
2165 /* */
2166 /* do */
2167 /* { */
2168 /* FT_Long id = ( instance_idx << 16 ) + face_idx; */
2169 /* */
2170 /* */
2171 /* error = FT_Open_Face( library, args, id, &face ); */
2172 /* if ( error ) { ... } */
2173 /* */
2174 /* num_faces = face->num_faces; */
2175 /* num_instances = face->style_flags >> 16; */
2176 /* */
2177 /* ... */
2178 /* */
2179 /* FT_Done_Face( face ); */
2180 /* */
2181 /* if ( instance_idx < num_instances ) */
2182 /* instance_idx++; */
2183 /* else */
2184 /* { */
2185 /* face_idx++; */
2186 /* instance_idx = 0; */
2187 /* } */
2188 /* */
2189 /* } while ( face_idx < num_faces ) */
2190 /* } */
2191 /* */
2067 FT_EXPORT( FT_Error ) 2192 FT_EXPORT( FT_Error )
2068 FT_Open_Face( FT_Library library, 2193 FT_Open_Face( FT_Library library,
2069 const FT_Open_Args* args, 2194 const FT_Open_Args* args,
2070 FT_Long face_index, 2195 FT_Long face_index,
2071 FT_Face *aface ); 2196 FT_Face *aface );
2072 2197
2073 2198
2074 /*************************************************************************/ 2199 /*************************************************************************/
2075 /* */ 2200 /* */
2076 /* <Function> */ 2201 /* <Function> */
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 FT_ULong char_code, 2619 FT_ULong char_code,
2495 FT_Int32 load_flags ); 2620 FT_Int32 load_flags );
2496 2621
2497 2622
2498 /************************************************************************* 2623 /*************************************************************************
2499 * 2624 *
2500 * @enum: 2625 * @enum:
2501 * FT_LOAD_XXX 2626 * FT_LOAD_XXX
2502 * 2627 *
2503 * @description: 2628 * @description:
2504 * A list of bit-field constants used with @FT_Load_Glyph to indicate 2629 * A list of bit field constants used with @FT_Load_Glyph to indicate
2505 * what kind of operations to perform during glyph loading. 2630 * what kind of operations to perform during glyph loading.
2506 * 2631 *
2507 * @values: 2632 * @values:
2508 * FT_LOAD_DEFAULT :: 2633 * FT_LOAD_DEFAULT ::
2509 * Corresponding to~0, this value is used as the default glyph load 2634 * Corresponding to~0, this value is used as the default glyph load
2510 * operation. In this case, the following happens: 2635 * operation. In this case, the following happens:
2511 * 2636 *
2512 * 1. FreeType looks for a bitmap for the glyph corresponding to the 2637 * 1. FreeType looks for a bitmap for the glyph corresponding to the
2513 * face's current size. If one is found, the function returns. 2638 * face's current size. If one is found, the function returns.
2514 * The bitmap data can be accessed from the glyph slot (see note 2639 * The bitmap data can be accessed from the glyph slot (see note
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2611 * Disable auto-hinter. See also the note below. 2736 * Disable auto-hinter. See also the note below.
2612 * 2737 *
2613 * FT_LOAD_COLOR :: 2738 * FT_LOAD_COLOR ::
2614 * This flag is used to request loading of color embedded-bitmap 2739 * This flag is used to request loading of color embedded-bitmap
2615 * images. The resulting color bitmaps, if available, will have the 2740 * images. The resulting color bitmaps, if available, will have the
2616 * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color 2741 * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color
2617 * bitmaps are found, they will be converted to 256-level gray 2742 * bitmaps are found, they will be converted to 256-level gray
2618 * bitmaps transparently. Those bitmaps will be in the 2743 * bitmaps transparently. Those bitmaps will be in the
2619 * @FT_PIXEL_MODE_GRAY format. 2744 * @FT_PIXEL_MODE_GRAY format.
2620 * 2745 *
2746 * FT_LOAD_COMPUTE_METRICS ::
2747 * This flag sets computing glyph metrics without the use of bundled
2748 * metrics tables (for example, the `hdmx' table in TrueType fonts).
2749 * Well-behaving fonts have optimized bundled metrics and these should
2750 * be used. This flag is mainly used by font validating or font
2751 * editing applications, which need to ignore, verify, or edit those
2752 * tables.
2753 *
2754 * Currently, this flag is only implemented for TrueType fonts.
2755 *
2621 * FT_LOAD_CROP_BITMAP :: 2756 * FT_LOAD_CROP_BITMAP ::
2622 * Ignored. Deprecated. 2757 * Ignored. Deprecated.
2623 * 2758 *
2624 * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: 2759 * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
2625 * Ignored. Deprecated. 2760 * Ignored. Deprecated.
2626 * 2761 *
2627 * @note: 2762 * @note:
2628 * By default, hinting is enabled and the font's native hinter (see 2763 * By default, hinting is enabled and the font's native hinter (see
2629 * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can 2764 * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can
2630 * disable hinting by setting @FT_LOAD_NO_HINTING or change the 2765 * disable hinting by setting @FT_LOAD_NO_HINTING or change the
(...skipping 25 matching lines...) Expand all
2656 #define FT_LOAD_CROP_BITMAP ( 1L << 6 ) 2791 #define FT_LOAD_CROP_BITMAP ( 1L << 6 )
2657 #define FT_LOAD_PEDANTIC ( 1L << 7 ) 2792 #define FT_LOAD_PEDANTIC ( 1L << 7 )
2658 #define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) 2793 #define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 )
2659 #define FT_LOAD_NO_RECURSE ( 1L << 10 ) 2794 #define FT_LOAD_NO_RECURSE ( 1L << 10 )
2660 #define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) 2795 #define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 )
2661 #define FT_LOAD_MONOCHROME ( 1L << 12 ) 2796 #define FT_LOAD_MONOCHROME ( 1L << 12 )
2662 #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) 2797 #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 )
2663 #define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) 2798 #define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
2664 /* Bits 16..19 are used by `FT_LOAD_TARGET_' */ 2799 /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
2665 #define FT_LOAD_COLOR ( 1L << 20 ) 2800 #define FT_LOAD_COLOR ( 1L << 20 )
2801 #define FT_LOAD_COMPUTE_METRICS ( 1L << 21 )
2666 2802
2667 /* */ 2803 /* */
2668 2804
2669 /* used internally only by certain font drivers! */ 2805 /* used internally only by certain font drivers! */
2670 #define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) 2806 #define FT_LOAD_ADVANCE_ONLY ( 1L << 8 )
2671 #define FT_LOAD_SBITS_ONLY ( 1L << 14 ) 2807 #define FT_LOAD_SBITS_ONLY ( 1L << 14 )
2672 2808
2673 2809
2674 /************************************************************************** 2810 /**************************************************************************
2675 * 2811 *
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
2900 /*************************************************************************/ 3036 /*************************************************************************/
2901 /* */ 3037 /* */
2902 /* <Enum> */ 3038 /* <Enum> */
2903 /* FT_Kerning_Mode */ 3039 /* FT_Kerning_Mode */
2904 /* */ 3040 /* */
2905 /* <Description> */ 3041 /* <Description> */
2906 /* An enumeration used to specify which kerning values to return in */ 3042 /* An enumeration used to specify which kerning values to return in */
2907 /* @FT_Get_Kerning. */ 3043 /* @FT_Get_Kerning. */
2908 /* */ 3044 /* */
2909 /* <Values> */ 3045 /* <Values> */
2910 /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */ 3046 /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */
2911 /* distances (value is~0). */ 3047 /* pixels (value is~0). Whether they are */
3048 /* scaled depends on @FT_LOAD_NO_SCALE. */
2912 /* */ 3049 /* */
2913 /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */ 3050 /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */
2914 /* distances. */ 3051 /* 26.6 fractional pixels. Whether they are */
3052 /* scaled depends on @FT_LOAD_NO_SCALE. */
2915 /* */ 3053 /* */
2916 /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ 3054 /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
2917 /* units. */ 3055 /* units. */
2918 /* */ 3056 /* */
3057 /* <Note> */
3058 /* FT_KERNING_DEFAULT returns full pixel values; it also makes */
3059 /* FreeType heuristically scale down kerning distances at small ppem */
3060 /* values so that they don't become too big. */
3061 /* */
2919 typedef enum FT_Kerning_Mode_ 3062 typedef enum FT_Kerning_Mode_
2920 { 3063 {
2921 FT_KERNING_DEFAULT = 0, 3064 FT_KERNING_DEFAULT = 0,
2922 FT_KERNING_UNFITTED, 3065 FT_KERNING_UNFITTED,
2923 FT_KERNING_UNSCALED 3066 FT_KERNING_UNSCALED
2924 3067
2925 } FT_Kerning_Mode; 3068 } FT_Kerning_Mode;
2926 3069
2927 3070
2928 /* these constants are deprecated; use the corresponding */ 3071 /* these constants are deprecated; use the corresponding */
(...skipping 16 matching lines...) Expand all
2945 /* */ 3088 /* */
2946 /* left_glyph :: The index of the left glyph in the kern pair. */ 3089 /* left_glyph :: The index of the left glyph in the kern pair. */
2947 /* */ 3090 /* */
2948 /* right_glyph :: The index of the right glyph in the kern pair. */ 3091 /* right_glyph :: The index of the right glyph in the kern pair. */
2949 /* */ 3092 /* */
2950 /* kern_mode :: See @FT_Kerning_Mode for more information. */ 3093 /* kern_mode :: See @FT_Kerning_Mode for more information. */
2951 /* Determines the scale and dimension of the returned */ 3094 /* Determines the scale and dimension of the returned */
2952 /* kerning vector. */ 3095 /* kerning vector. */
2953 /* */ 3096 /* */
2954 /* <Output> */ 3097 /* <Output> */
2955 /* akerning :: The kerning vector. This is either in font units */ 3098 /* akerning :: The kerning vector. This is either in font units, */
2956 /* or in pixels (26.6 format) for scalable formats, */ 3099 /* fractional pixels (26.6 format), or pixels for */
2957 /* and in pixels for fixed-sizes formats. */ 3100 /* scalable formats, and in pixels for fixed-sizes */
3101 /* formats. */
2958 /* */ 3102 /* */
2959 /* <Return> */ 3103 /* <Return> */
2960 /* FreeType error code. 0~means success. */ 3104 /* FreeType error code. 0~means success. */
2961 /* */ 3105 /* */
2962 /* <Note> */ 3106 /* <Note> */
2963 /* Only horizontal layouts (left-to-right & right-to-left) are */ 3107 /* Only horizontal layouts (left-to-right & right-to-left) are */
2964 /* supported by this method. Other layouts, or more sophisticated */ 3108 /* supported by this method. Other layouts, or more sophisticated */
2965 /* kernings, are out of the scope of this API function -- they can be */ 3109 /* kernings, are out of the scope of this API function -- they can be */
2966 /* implemented through format-specific interfaces. */ 3110 /* implemented through format-specific interfaces. */
2967 /* */ 3111 /* */
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 /* */ 3376 /* */
3233 /* charcode = FT_Get_First_Char( face, &gindex ); */ 3377 /* charcode = FT_Get_First_Char( face, &gindex ); */
3234 /* while ( gindex != 0 ) */ 3378 /* while ( gindex != 0 ) */
3235 /* { */ 3379 /* { */
3236 /* ... do something with (charcode,gindex) pair ... */ 3380 /* ... do something with (charcode,gindex) pair ... */
3237 /* */ 3381 /* */
3238 /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ 3382 /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */
3239 /* } */ 3383 /* } */
3240 /* } */ 3384 /* } */
3241 /* */ 3385 /* */
3386 /* Be aware that character codes can have values up to 0xFFFFFFFF; */
3387 /* this might happen for non-Unicode or malformed cmaps. However, */
3388 /* even with regular Unicode encoding, so-called `last resort fonts' */
3389 /* (using SFNT cmap format 13, see function @FT_Get_CMap_Format) */
3390 /* normally have entries for all Unicode characters up to 0x1FFFFF, */
3391 /* which can cause *a lot* of iterations. */
3392 /* */
3242 /* Note that `*agindex' is set to~0 if the charmap is empty. The */ 3393 /* Note that `*agindex' is set to~0 if the charmap is empty. The */
3243 /* result itself can be~0 in two cases: if the charmap is empty or */ 3394 /* result itself can be~0 in two cases: if the charmap is empty or */
3244 /* if the value~0 is the first valid character code. */ 3395 /* if the value~0 is the first valid character code. */
3245 /* */ 3396 /* */
3246 FT_EXPORT( FT_ULong ) 3397 FT_EXPORT( FT_ULong )
3247 FT_Get_First_Char( FT_Face face, 3398 FT_Get_First_Char( FT_Face face,
3248 FT_UInt *agindex ); 3399 FT_UInt *agindex );
3249 3400
3250 3401
3251 /*************************************************************************/ 3402 /*************************************************************************/
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3391 /* <Enum> */ 3542 /* <Enum> */
3392 /* FT_FSTYPE_XXX */ 3543 /* FT_FSTYPE_XXX */
3393 /* */ 3544 /* */
3394 /* <Description> */ 3545 /* <Description> */
3395 /* A list of bit flags used in the `fsType' field of the OS/2 table */ 3546 /* A list of bit flags used in the `fsType' field of the OS/2 table */
3396 /* in a TrueType or OpenType font and the `FSType' entry in a */ 3547 /* in a TrueType or OpenType font and the `FSType' entry in a */
3397 /* PostScript font. These bit flags are returned by */ 3548 /* PostScript font. These bit flags are returned by */
3398 /* @FT_Get_FSType_Flags; they inform client applications of embedding */ 3549 /* @FT_Get_FSType_Flags; they inform client applications of embedding */
3399 /* and subsetting restrictions associated with a font. */ 3550 /* and subsetting restrictions associated with a font. */
3400 /* */ 3551 /* */
3401 /* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */ 3552 /* See */
3402 /* more details. */ 3553 /* http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolici es.pdf */
3554 /* for more details. */
3403 /* */ 3555 /* */
3404 /* <Values> */ 3556 /* <Values> */
3405 /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ 3557 /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */
3406 /* Fonts with no fsType bit set may be embedded and permanently */ 3558 /* Fonts with no fsType bit set may be embedded and permanently */
3407 /* installed on the remote system by an application. */ 3559 /* installed on the remote system by an application. */
3408 /* */ 3560 /* */
3409 /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ 3561 /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */
3410 /* Fonts that have only this bit set must not be modified, embedded */ 3562 /* Fonts that have only this bit set must not be modified, embedded */
3411 /* or exchanged in any manner without first obtaining permission of */ 3563 /* or exchanged in any manner without first obtaining permission of */
3412 /* the font software copyright owner. */ 3564 /* the font software copyright owner. */
(...skipping 13 matching lines...) Expand all
3426 /* FT_FSTYPE_NO_SUBSETTING :: */ 3578 /* FT_FSTYPE_NO_SUBSETTING :: */
3427 /* If this bit is set, the font may not be subsetted prior to */ 3579 /* If this bit is set, the font may not be subsetted prior to */
3428 /* embedding. */ 3580 /* embedding. */
3429 /* */ 3581 /* */
3430 /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ 3582 /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */
3431 /* If this bit is set, only bitmaps contained in the font may be */ 3583 /* If this bit is set, only bitmaps contained in the font may be */
3432 /* embedded; no outline data may be embedded. If there are no */ 3584 /* embedded; no outline data may be embedded. If there are no */
3433 /* bitmaps available in the font, then the font is unembeddable. */ 3585 /* bitmaps available in the font, then the font is unembeddable. */
3434 /* */ 3586 /* */
3435 /* <Note> */ 3587 /* <Note> */
3588 /* The flags are ORed together, thus more than a single value can be */
3589 /* returned. */
3590 /* */
3436 /* While the fsType flags can indicate that a font may be embedded, a */ 3591 /* While the fsType flags can indicate that a font may be embedded, a */
3437 /* license with the font vendor may be separately required to use the */ 3592 /* license with the font vendor may be separately required to use the */
3438 /* font in this way. */ 3593 /* font in this way. */
3439 /* */ 3594 /* */
3440 #define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 3595 #define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000
3441 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 3596 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002
3442 #define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 3597 #define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004
3443 #define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 3598 #define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008
3444 #define FT_FSTYPE_NO_SUBSETTING 0x0100 3599 #define FT_FSTYPE_NO_SUBSETTING 0x0100
3445 #define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 3600 #define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
3811 /* <Function> */ 3966 /* <Function> */
3812 /* FT_RoundFix */ 3967 /* FT_RoundFix */
3813 /* */ 3968 /* */
3814 /* <Description> */ 3969 /* <Description> */
3815 /* A very simple function used to round a 16.16 fixed number. */ 3970 /* A very simple function used to round a 16.16 fixed number. */
3816 /* */ 3971 /* */
3817 /* <Input> */ 3972 /* <Input> */
3818 /* a :: The number to be rounded. */ 3973 /* a :: The number to be rounded. */
3819 /* */ 3974 /* */
3820 /* <Return> */ 3975 /* <Return> */
3821 /* The result of `(a + 0x8000) & -0x10000'. */ 3976 /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */
3977 /* from zero. */
3822 /* */ 3978 /* */
3823 FT_EXPORT( FT_Fixed ) 3979 FT_EXPORT( FT_Fixed )
3824 FT_RoundFix( FT_Fixed a ); 3980 FT_RoundFix( FT_Fixed a );
3825 3981
3826 3982
3827 /*************************************************************************/ 3983 /*************************************************************************/
3828 /* */ 3984 /* */
3829 /* <Function> */ 3985 /* <Function> */
3830 /* FT_CeilFix */ 3986 /* FT_CeilFix */
3831 /* */ 3987 /* */
3832 /* <Description> */ 3988 /* <Description> */
3833 /* A very simple function used to compute the ceiling function of a */ 3989 /* A very simple function used to compute the ceiling function of a */
3834 /* 16.16 fixed number. */ 3990 /* 16.16 fixed number. */
3835 /* */ 3991 /* */
3836 /* <Input> */ 3992 /* <Input> */
3837 /* a :: The number for which the ceiling function is to be computed. */ 3993 /* a :: The number for which the ceiling function is to be computed. */
3838 /* */ 3994 /* */
3839 /* <Return> */ 3995 /* <Return> */
3840 /* The result of `(a + 0x10000 - 1) & -0x10000'. */ 3996 /* `a' rounded towards plus infinity. */
3841 /* */ 3997 /* */
3842 FT_EXPORT( FT_Fixed ) 3998 FT_EXPORT( FT_Fixed )
3843 FT_CeilFix( FT_Fixed a ); 3999 FT_CeilFix( FT_Fixed a );
3844 4000
3845 4001
3846 /*************************************************************************/ 4002 /*************************************************************************/
3847 /* */ 4003 /* */
3848 /* <Function> */ 4004 /* <Function> */
3849 /* FT_FloorFix */ 4005 /* FT_FloorFix */
3850 /* */ 4006 /* */
3851 /* <Description> */ 4007 /* <Description> */
3852 /* A very simple function used to compute the floor function of a */ 4008 /* A very simple function used to compute the floor function of a */
3853 /* 16.16 fixed number. */ 4009 /* 16.16 fixed number. */
3854 /* */ 4010 /* */
3855 /* <Input> */ 4011 /* <Input> */
3856 /* a :: The number for which the floor function is to be computed. */ 4012 /* a :: The number for which the floor function is to be computed. */
3857 /* */ 4013 /* */
3858 /* <Return> */ 4014 /* <Return> */
3859 /* The result of `a & -0x10000'. */ 4015 /* `a' rounded towards minus infinity. */
3860 /* */ 4016 /* */
3861 FT_EXPORT( FT_Fixed ) 4017 FT_EXPORT( FT_Fixed )
3862 FT_FloorFix( FT_Fixed a ); 4018 FT_FloorFix( FT_Fixed a );
3863 4019
3864 4020
3865 /*************************************************************************/ 4021 /*************************************************************************/
3866 /* */ 4022 /* */
3867 /* <Function> */ 4023 /* <Function> */
3868 /* FT_Vector_Transform */ 4024 /* FT_Vector_Transform */
3869 /* */ 4025 /* */
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
3929 * FREETYPE_MINOR :: The minor version number. 4085 * FREETYPE_MINOR :: The minor version number.
3930 * FREETYPE_PATCH :: The patch level. 4086 * FREETYPE_PATCH :: The patch level.
3931 * 4087 *
3932 * @note: 4088 * @note:
3933 * The version number of FreeType if built as a dynamic link library 4089 * The version number of FreeType if built as a dynamic link library
3934 * with the `libtool' package is _not_ controlled by these three 4090 * with the `libtool' package is _not_ controlled by these three
3935 * macros. 4091 * macros.
3936 * 4092 *
3937 */ 4093 */
3938 #define FREETYPE_MAJOR 2 4094 #define FREETYPE_MAJOR 2
3939 #define FREETYPE_MINOR 5 4095 #define FREETYPE_MINOR 6
3940 #define FREETYPE_PATCH 4 4096 #define FREETYPE_PATCH 1
3941 4097
3942 4098
3943 /*************************************************************************/ 4099 /*************************************************************************/
3944 /* */ 4100 /* */
3945 /* <Function> */ 4101 /* <Function> */
3946 /* FT_Library_Version */ 4102 /* FT_Library_Version */
3947 /* */ 4103 /* */
3948 /* <Description> */ 4104 /* <Description> */
3949 /* Return the version of the FreeType library being used. This is */ 4105 /* Return the version of the FreeType library being used. This is */
3950 /* useful when dynamically linking to the library, since one cannot */ 4106 /* useful when dynamically linking to the library, since one cannot */
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
4039 4195
4040 /* */ 4196 /* */
4041 4197
4042 4198
4043 FT_END_HEADER 4199 FT_END_HEADER
4044 4200
4045 #endif /* __FREETYPE_H__ */ 4201 #endif /* __FREETYPE_H__ */
4046 4202
4047 4203
4048 /* END */ 4204 /* END */
OLDNEW
« no previous file with comments | « third_party/freetype/include/freetype/config/ftstdlib.h ('k') | third_party/freetype/include/freetype/ftadvanc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698