/[freetype]/freetype2/include/freetype/freetype.h
ViewVC logotype

Diff of /freetype2/include/freetype/freetype.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.158 by wl, Fri Sep 23 07:40:27 2005 UTC revision 1.159 by wl, Wed Oct 5 10:21:58 2005 UTC
# Line 419  FT_BEGIN_HEADER Line 419  FT_BEGIN_HEADER
419    /*                                                                       */    /*                                                                       */
420    /* <Note>                                                                */    /* <Note>                                                                */
421    /*    Each face object owns one or more sizes.  There is however a       */    /*    Each face object owns one or more sizes.  There is however a       */
422    /*    single _active_ size for the face at any time that will be used by */    /*    single _active_ size for the face at any time that is used by      */
423    /*    functions like @FT_Load_Glyph, @FT_Get_Kerning, etc.               */    /*    functions like @FT_Load_Glyph, @FT_Get_Kerning, etc.               */
424    /*                                                                       */    /*                                                                       */
425    /*    You can use the @FT_Activate_Size API to change the current        */    /*    You can use the @FT_Activate_Size API to change the current        */
# Line 616  FT_BEGIN_HEADER Line 616  FT_BEGIN_HEADER
616    /* <Note>                                                                */    /* <Note>                                                                */
617    /*   By default, FreeType automatically synthetizes a Unicode charmap    */    /*   By default, FreeType automatically synthetizes a Unicode charmap    */
618    /*   for Postscript fonts, using their glyph names dictionaries.         */    /*   for Postscript fonts, using their glyph names dictionaries.         */
619    /*   However, it will also report the encodings defined explicitly in    */    /*   However, it also reports the encodings defined explicitly in the    */
620    /*   the font file, for the cases when they are needed, with the Adobe   */    /*   font file, for the cases when they are needed, with the Adobe       */
621    /*   values as well.                                                     */    /*   values as well.                                                     */
622    /*                                                                       */    /*                                                                       */
623    /*   FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap   */    /*   FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap   */
# Line 1038  FT_BEGIN_HEADER Line 1038  FT_BEGIN_HEADER
1038    /*    FT_FACE_FLAG_KERNING ::                                            */    /*    FT_FACE_FLAG_KERNING ::                                            */
1039    /*      Indicates that the face contains kerning information.  If set,   */    /*      Indicates that the face contains kerning information.  If set,   */
1040    /*      the kerning distance can be retrieved through the function       */    /*      the kerning distance can be retrieved through the function       */
1041    /*      @FT_Get_Kerning.  Note that if unset, this function will always  */    /*      @FT_Get_Kerning.  Otherwise the function always return the       */
1042    /*      return the vector (0,0).                                         */    /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */
1043      /*      from the `GPOS' table (as present in some OpenType fonts).       */
1044    /*                                                                       */    /*                                                                       */
1045    /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */    /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
1046    /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */    /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
# Line 1485  FT_BEGIN_HEADER Line 1486  FT_BEGIN_HEADER
1486    /*                         data.                                         */    /*                         data.                                         */
1487    /*                                                                       */    /*                                                                       */
1488    /*    other             :: Really wicked formats can use this pointer to */    /*    other             :: Really wicked formats can use this pointer to */
1489    /*                         present their own glyph image to client apps. */    /*                         present their own glyph image to client       */
1490    /*                         Note that the app will need to know about the */    /*                         applications.  Note that the application      */
1491    /*                         image format.                                 */    /*                         needs to know about the image format.         */
1492    /*                                                                       */    /*                                                                       */
1493    /*    lsb_delta         :: The difference between hinted and unhinted    */    /*    lsb_delta         :: The difference between hinted and unhinted    */
1494    /*                         left side bearing while autohinting is        */    /*                         left side bearing while autohinting is        */
# Line 1761  FT_BEGIN_HEADER Line 1762  FT_BEGIN_HEADER
1762    /*                                                                       */    /*                                                                       */
1763    /*    driver      :: This field is exclusively used by @FT_Open_Face;    */    /*    driver      :: This field is exclusively used by @FT_Open_Face;    */
1764    /*                   it simply specifies the font driver to use to open  */    /*                   it simply specifies the font driver to use to open  */
1765    /*                   the face.  If set to 0, FreeType will try to load   */    /*                   the face.  If set to 0, FreeType tries to load the  */
1766    /*                   the face with each one of the drivers in its list.  */    /*                   face with each one of the drivers in its list.      */
1767    /*                                                                       */    /*                                                                       */
1768    /*    num_params  :: The number of extra parameters.                     */    /*    num_params  :: The number of extra parameters.                     */
1769    /*                                                                       */    /*                                                                       */
# Line 1782  FT_BEGIN_HEADER Line 1783  FT_BEGIN_HEADER
1783    /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */    /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */
1784    /*    is a normal file and use `pathname' to open it.                    */    /*    is a normal file and use `pathname' to open it.                    */
1785    /*                                                                       */    /*                                                                       */
1786    /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face will only try to */    /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to    */
1787    /*    open the file with the driver whose handler is in `driver'.        */    /*    open the file with the driver whose handler is in `driver'.        */
1788    /*                                                                       */    /*                                                                       */
1789    /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */    /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */
1790    /*    `num_params' and `params' will be used.  They are ignored          */    /*    `num_params' and `params' is used.  They are ignored otherwise.    */
   /*    otherwise.                                                         */  
1791    /*                                                                       */    /*                                                                       */
1792    typedef struct  FT_Open_Args_    typedef struct  FT_Open_Args_
1793    {    {
# Line 1834  FT_BEGIN_HEADER Line 1834  FT_BEGIN_HEADER
1834    /*                                                                       */    /*                                                                       */
1835    /*    @FT_New_Face can be used to determine and/or check the font format */    /*    @FT_New_Face can be used to determine and/or check the font format */
1836    /*    of a given font resource.  If the `face_index' field is negative,  */    /*    of a given font resource.  If the `face_index' field is negative,  */
1837    /*    the function will _not_ return any face handle in `aface';  the    */    /*    the function does _not_ return any face handle in `aface';  the    */
1838    /*    return value is 0 if the font format is recognized, or non-zero    */    /*    return value is 0 if the font format is recognized, or non-zero    */
1839    /*    otherwise.                                                         */    /*    otherwise.                                                         */
1840    /*                                                                       */    /*                                                                       */
# Line 1886  FT_BEGIN_HEADER Line 1886  FT_BEGIN_HEADER
1886    /*                                                                       */    /*                                                                       */
1887    /*    @FT_New_Memory_Face can be used to determine and/or check the font */    /*    @FT_New_Memory_Face can be used to determine and/or check the font */
1888    /*    format of a given font resource.  If the `face_index' field is     */    /*    format of a given font resource.  If the `face_index' field is     */
1889    /*    negative, the function will _not_ return any face handle in        */    /*    negative, the function does _not_ return any face handle in        */
1890    /*    `aface'; the return value is 0 if the font format is recognized,   */    /*    `aface'; the return value is 0 if the font format is recognized,   */
1891    /*    or non-zero otherwise.                                             */    /*    or non-zero otherwise.                                             */
1892    /*                                                                       */    /*                                                                       */
# Line 1906  FT_BEGIN_HEADER Line 1906  FT_BEGIN_HEADER
1906    /* <Description>                                                         */    /* <Description>                                                         */
1907    /*    Opens a face object from a given resource and typeface index using */    /*    Opens a face object from a given resource and typeface index using */
1908    /*    an `FT_Open_Args' structure.  If the face object doesn't exist, it */    /*    an `FT_Open_Args' structure.  If the face object doesn't exist, it */
1909    /*    will be created.                                                   */    /*    is created.                                                        */
1910    /*                                                                       */    /*                                                                       */
1911    /* <InOut>                                                               */    /* <InOut>                                                               */
1912    /*    library    :: A handle to the library resource.                    */    /*    library    :: A handle to the library resource.                    */
# Line 1931  FT_BEGIN_HEADER Line 1931  FT_BEGIN_HEADER
1931    /*                                                                       */    /*                                                                       */
1932    /*    @FT_Open_Face can be used to determine and/or check the font       */    /*    @FT_Open_Face can be used to determine and/or check the font       */
1933    /*    format of a given font resource.  If the `face_index' field is     */    /*    format of a given font resource.  If the `face_index' field is     */
1934    /*    negative, the function will _not_ return any face handle in        */    /*    negative, the function does _not_ return any face handle in        */
1935    /*    `*aface'; the function's return value is 0 if the font format is   */    /*    `*aface'; the function's return value is 0 if the font format is   */
1936    /*    recognized, or non-zero otherwise.                                 */    /*    recognized, or non-zero otherwise.                                 */
1937    /*                                                                       */    /*                                                                       */
# Line 2104  FT_BEGIN_HEADER Line 2104  FT_BEGIN_HEADER
2104    /*                                                                       */    /*                                                                       */
2105    /*    The `character size' is really the size of an abstract square      */    /*    The `character size' is really the size of an abstract square      */
2106    /*    called the `EM', used to design the font.  However, depending      */    /*    called the `EM', used to design the font.  However, depending      */
2107    /*    on the font design, glyphs will be smaller or greater than the     */    /*    on the font design, glyphs is smaller or greater than the EM.      */
   /*    EM.                                                                */  
2108    /*                                                                       */    /*                                                                       */
2109    /*    This means that setting the pixel size to, say, 8x8 doesn't        */    /*    This means that setting the pixel size to, say, 8x8 doesn't        */
2110    /*    guarantee in any way that you will get glyph bitmaps that all fit  */    /*    guarantee in any way that you get glyph bitmaps that all fit       */
2111    /*    within an 8x8 cell (sometimes even far from it).                   */    /*    within an 8x8 cell (sometimes even far from it).                   */
2112    /*                                                                       */    /*                                                                       */
2113    /*    For bitmap fonts, `pixel_height' usually is a reliable value for   */    /*    For bitmap fonts, `pixel_height' usually is a reliable value for   */
# Line 2136  FT_BEGIN_HEADER Line 2135  FT_BEGIN_HEADER
2135    /*                                                                       */    /*                                                                       */
2136    /* <InOut>                                                               */    /* <InOut>                                                               */
2137    /*    face        :: A handle to the target face object where the glyph  */    /*    face        :: A handle to the target face object where the glyph  */
2138    /*                   will be loaded.                                     */    /*                   is loaded.                                          */
2139    /*                                                                       */    /*                                                                       */
2140    /* <Input>                                                               */    /* <Input>                                                               */
2141    /*    glyph_index :: The index of the glyph in the font file.  For       */    /*    glyph_index :: The index of the glyph in the font file.  For       */
# Line 2154  FT_BEGIN_HEADER Line 2153  FT_BEGIN_HEADER
2153    /*                                                                       */    /*                                                                       */
2154    /* <Note>                                                                */    /* <Note>                                                                */
2155    /*    If the glyph image is not a bitmap, and if the bit flag            */    /*    If the glyph image is not a bitmap, and if the bit flag            */
2156    /*    FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be         */    /*    FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image is transformed  */
2157    /*    transformed with the information passed to a previous call to      */    /*    with the information passed to a previous call to                  */
2158    /*    @FT_Set_Transform.                                                 */    /*    @FT_Set_Transform.                                                 */
2159    /*                                                                       */    /*                                                                       */
2160    /*    Note that this also transforms the `face.glyph.advance' field, but */    /*    Note that this also transforms the `face.glyph.advance' field, but */
# Line 2178  FT_BEGIN_HEADER Line 2177  FT_BEGIN_HEADER
2177    /*                                                                       */    /*                                                                       */
2178    /* <InOut>                                                               */    /* <InOut>                                                               */
2179    /*    face        :: A handle to a target face object where the glyph    */    /*    face        :: A handle to a target face object where the glyph    */
2180    /*                   will be loaded.                                     */    /*                   is loaded.                                          */
2181    /*                                                                       */    /*                                                                       */
2182    /* <Input>                                                               */    /* <Input>                                                               */
2183    /*    char_code   :: The glyph's character code, according to the        */    /*    char_code   :: The glyph's character code, according to the        */
# Line 2195  FT_BEGIN_HEADER Line 2194  FT_BEGIN_HEADER
2194    /*                                                                       */    /*                                                                       */
2195    /* <Note>                                                                */    /* <Note>                                                                */
2196    /*    If the face has no current charmap, or if the character code       */    /*    If the face has no current charmap, or if the character code       */
2197    /*    is not defined in the charmap, this function will return an        */    /*    is not defined in the charmap, this function returns an error.     */
   /*    error.                                                             */  
2198    /*                                                                       */    /*                                                                       */
2199    /*    If the glyph image is not a bitmap, and if the bit flag            */    /*    If the glyph image is not a bitmap, and if the bit flag            */
2200    /*    FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be         */    /*    FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image is              */
2201    /*    transformed with the information passed to a previous call to      */    /*    transformed with the information passed to a previous call to      */
2202    /*    @FT_Set_Transform.                                                 */    /*    @FT_Set_Transform.                                                 */
2203    /*                                                                       */    /*                                                                       */
# Line 2224  FT_BEGIN_HEADER Line 2222  FT_BEGIN_HEADER
2222    * @values:    * @values:
2223    *   FT_LOAD_DEFAULT ::    *   FT_LOAD_DEFAULT ::
2224    *     Corresponding to 0, this value is used a default glyph load.  In this    *     Corresponding to 0, this value is used a default glyph load.  In this
2225    *     case, the following will happen:    *     case, the following happens:
2226    *    *
2227    *     1. FreeType looks for a bitmap for the glyph corresponding to the    *     1. FreeType looks for a bitmap for the glyph corresponding to the
2228    *        face's current size.  If one is found, the function returns.  The    *        face's current size.  If one is found, the function returns.  The
# Line 2264  FT_BEGIN_HEADER Line 2262  FT_BEGIN_HEADER
2262    *    *
2263    *   FT_LOAD_NO_BITMAP ::    *   FT_LOAD_NO_BITMAP ::
2264    *     Don't look for bitmaps when loading the glyph.  Only scalable    *     Don't look for bitmaps when loading the glyph.  Only scalable
2265    *     outlines will be loaded when available, and scaled, hinted, or    *     outlines are loaded when available, and scaled, hinted, or
2266    *     rendered depending on other bit flags.    *     rendered depending on other bit flags.
2267    *    *
2268    *     This does not prevent you from rendering outlines to bitmaps    *     This does not prevent you from rendering outlines to bitmaps
# Line 2272  FT_BEGIN_HEADER Line 2270  FT_BEGIN_HEADER
2270    *    *
2271    *   FT_LOAD_VERTICAL_LAYOUT ::    *   FT_LOAD_VERTICAL_LAYOUT ::
2272    *     Prepare the glyph image for vertical text layout.  This basically    *     Prepare the glyph image for vertical text layout.  This basically
2273    *     means that `face.glyph.advance' will correspond to the vertical    *     means that `face.glyph.advance' corresponds to the vertical
2274    *     advance height (instead of the default horizontal advance width),    *     advance height (instead of the default horizontal advance width),
2275    *     and that the glyph image will be translated to match the vertical    *     and that the glyph image is translated to match the vertical
2276    *     bearings positions.    *     bearings positions.
2277    *    *
2278    *   FT_LOAD_FORCE_AUTOHINT ::    *   FT_LOAD_FORCE_AUTOHINT ::
# Line 2658  FT_BEGIN_HEADER Line 2656  FT_BEGIN_HEADER
2656    /*                   buffer.                                             */    /*                   buffer.                                             */
2657    /*                                                                       */    /*                                                                       */
2658    /* <Output>                                                              */    /* <Output>                                                              */
2659    /*    buffer      :: A pointer to a target buffer where the name will be */    /*    buffer      :: A pointer to a target buffer where the name is      */
2660    /*                   copied to.                                          */    /*                   copied to.                                          */
2661    /*                                                                       */    /*                                                                       */
2662    /* <Return>                                                              */    /* <Return>                                                              */
# Line 2667  FT_BEGIN_HEADER Line 2665  FT_BEGIN_HEADER
2665    /* <Note>                                                                */    /* <Note>                                                                */
2666    /*    An error is returned if the face doesn't provide glyph names or if */    /*    An error is returned if the face doesn't provide glyph names or if */
2667    /*    the glyph index is invalid.  In all cases of failure, the first    */    /*    the glyph index is invalid.  In all cases of failure, the first    */
2668    /*    byte of `buffer' will be set to 0 to indicate an empty name.       */    /*    byte of `buffer' is set to 0 to indicate an empty name.            */
2669    /*                                                                       */    /*                                                                       */
2670    /*    The glyph name is truncated to fit within the buffer if it is too  */    /*    The glyph name is truncated to fit within the buffer if it is too  */
2671    /*    long.  The returned string is always zero-terminated.              */    /*    long.  The returned string is always zero-terminated.              */
# Line 2725  FT_BEGIN_HEADER Line 2723  FT_BEGIN_HEADER
2723    /*    FreeType error code.  0 means success.                             */    /*    FreeType error code.  0 means success.                             */
2724    /*                                                                       */    /*                                                                       */
2725    /* <Note>                                                                */    /* <Note>                                                                */
2726    /*    This function will return an error if no charmap in the face       */    /*    This function returns an error if no charmap in the face           */
2727    /*    corresponds to the encoding queried here.                          */    /*    corresponds to the encoding queried here.                          */
2728    /*                                                                       */    /*                                                                       */
2729    FT_EXPORT( FT_Error )    FT_EXPORT( FT_Error )
# Line 2752  FT_BEGIN_HEADER Line 2750  FT_BEGIN_HEADER
2750    /*    FreeType error code.  0 means success.                             */    /*    FreeType error code.  0 means success.                             */
2751    /*                                                                       */    /*                                                                       */
2752    /* <Note>                                                                */    /* <Note>                                                                */
2753    /*    This function will return an error if the charmap is not part of   */    /*    This function returns an error if the charmap is not part of       */
2754    /*    the face (i.e., if it is not listed in the face->charmaps[]        */    /*    the face (i.e., if it is not listed in the face->charmaps[]        */
2755    /*    table).                                                            */    /*    table).                                                            */
2756    /*                                                                       */    /*                                                                       */
# Line 2815  FT_BEGIN_HEADER Line 2813  FT_BEGIN_HEADER
2813    /*                                                                       */    /*                                                                       */
2814    /* <Description>                                                         */    /* <Description>                                                         */
2815    /*    This function is used to return the first character code in the    */    /*    This function is used to return the first character code in the    */
2816    /*    current charmap of a given face.  It will also return the          */    /*    current charmap of a given face.  It also returns the              */
2817    /*    corresponding glyph index.                                         */    /*    corresponding glyph index.                                         */
2818    /*                                                                       */    /*                                                                       */
2819    /* <Input>                                                               */    /* <Input>                                                               */
# Line 2847  FT_BEGIN_HEADER Line 2845  FT_BEGIN_HEADER
2845    /*      }                                                                */    /*      }                                                                */
2846    /*    }                                                                  */    /*    }                                                                  */
2847    /*                                                                       */    /*                                                                       */
2848    /*    Note that `*agindex' will be set to 0 if the charmap is empty.     */    /*    Note that `*agindex' is set to 0 if the charmap is empty.  The     */
2849    /*    The result itself can be 0 in two cases: if the charmap is empty   */    /*    result itself can be 0 in two cases: if the charmap is empty or    */
2850    /*    or when the value 0 is the first valid character code.             */    /*    when the value 0 is the first valid character code.                */
2851    /*                                                                       */    /*                                                                       */
2852    FT_EXPORT( FT_ULong )    FT_EXPORT( FT_ULong )
2853    FT_Get_First_Char( FT_Face   face,    FT_Get_First_Char( FT_Face   face,
# Line 2882  FT_BEGIN_HEADER Line 2880  FT_BEGIN_HEADER
2880    /*    through all character codes available in a given charmap.  See     */    /*    through all character codes available in a given charmap.  See     */
2881    /*    the note for this function for a simple code example.              */    /*    the note for this function for a simple code example.              */
2882    /*                                                                       */    /*                                                                       */
2883    /*    Note that `*agindex' will be set to 0 when there are no more codes */    /*    Note that `*agindex' is set to 0 when there are no more codes in   */
2884    /*    in the charmap.                                                    */    /*    the charmap.                                                       */
2885    /*                                                                       */    /*                                                                       */
2886    FT_EXPORT( FT_ULong )    FT_EXPORT( FT_ULong )
2887    FT_Get_Next_Char( FT_Face    face,    FT_Get_Next_Char( FT_Face    face,

Legend:
Removed from v.1.158  
changed lines
  Added in v.1.159

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26