|
|
|
@ -2992,6 +2992,147 @@ FT_BEGIN_HEADER |
|
|
|
|
FT_UInt *agindex ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
|
/* <Function> */ |
|
|
|
|
/* FT_Get_Name_Index */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Description> */ |
|
|
|
|
/* Return the glyph index of a given glyph name. This function uses */ |
|
|
|
|
/* driver specific objects to do the translation. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* face :: A handle to the source face object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* glyph_name :: The glyph name. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* The glyph index. 0 means `undefined character code'. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_UInt ) |
|
|
|
|
FT_Get_Name_Index( FT_Face face, |
|
|
|
|
FT_String* glyph_name ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* |
|
|
|
|
* @macro: |
|
|
|
|
* FT_SUBGLYPH_FLAG_XXX |
|
|
|
|
* |
|
|
|
|
* @description: |
|
|
|
|
* A list of constants used to describe subglyphs. Please refer to the |
|
|
|
|
* TrueType specification for the meaning of the various flags. |
|
|
|
|
* |
|
|
|
|
* @values: |
|
|
|
|
* FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_SCALE :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_XY_SCALE :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_2X2 :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_USE_MY_METRICS :: |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_SCALE 8 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_2X2 0x80 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* |
|
|
|
|
* @func: |
|
|
|
|
* FT_Get_SubGlyph_Info |
|
|
|
|
* |
|
|
|
|
* @description: |
|
|
|
|
* Retrieve a description of a given subglyph. Only use it if |
|
|
|
|
* `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE, or an error is |
|
|
|
|
* returned. |
|
|
|
|
* |
|
|
|
|
* @input: |
|
|
|
|
* glyph :: |
|
|
|
|
* The source glyph slot. |
|
|
|
|
* |
|
|
|
|
* sub_index :: |
|
|
|
|
* The index of subglyph. Must be less than `glyph->num_subglyphs'. |
|
|
|
|
* |
|
|
|
|
* @output: |
|
|
|
|
* p_index :: |
|
|
|
|
* The glyph index of the subglyph. |
|
|
|
|
* |
|
|
|
|
* p_flags :: |
|
|
|
|
* The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. |
|
|
|
|
* |
|
|
|
|
* p_arg1 :: |
|
|
|
|
* The subglyph's first argument (if any). |
|
|
|
|
* |
|
|
|
|
* p_arg2 :: |
|
|
|
|
* The subglyph's second argument (if any). |
|
|
|
|
* |
|
|
|
|
* p_transform :: |
|
|
|
|
* The subglyph transformation (if any). |
|
|
|
|
* |
|
|
|
|
* @return: |
|
|
|
|
* FreeType error code. 0 means success. |
|
|
|
|
* |
|
|
|
|
* @note: |
|
|
|
|
* The values of `*p_arg1', `*p_arg2', and `*p_transform' must be |
|
|
|
|
* interpreted depending on the flags returned in `*p_flags'. See the |
|
|
|
|
* TrueType specification for details. |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
FT_EXPORT( FT_Error ) |
|
|
|
|
FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, |
|
|
|
|
FT_UInt sub_index, |
|
|
|
|
FT_Int *p_index, |
|
|
|
|
FT_UInt *p_flags, |
|
|
|
|
FT_Int *p_arg1, |
|
|
|
|
FT_Int *p_arg2, |
|
|
|
|
FT_Matrix *p_transform ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
|
/* <Section> */ |
|
|
|
|
/* glyph_variants */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Title> */ |
|
|
|
|
/* Glyph Variants */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Abstract> */ |
|
|
|
|
/* The FreeType 2 interface to Unicode Ideographic Variation */ |
|
|
|
|
/* Sequences (IVS), using the SFNT cmap format 14. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Description> */ |
|
|
|
|
/* Many CJK characters have variant forms. They are a sort of grey */ |
|
|
|
|
/* area somewhere between being totally irrelevant and semantically */ |
|
|
|
|
/* distinct; for this reason, the Unicode consortium decided to */ |
|
|
|
|
/* introduce Ideographic Variation Sequences (IVS), consisting of a */ |
|
|
|
|
/* Unicode base character and one of 240 variant selectors */ |
|
|
|
|
/* (U+E0100-U+E01EF), instead of further extending the already huge */ |
|
|
|
|
/* code range for CJK characters. */ |
|
|
|
|
/* */ |
|
|
|
|
/* An IVS is registered and unique; for further details please refer */ |
|
|
|
|
/* to Unicode Technical Report #37, the Ideographic Variation */ |
|
|
|
|
/* Database. To date (October 2007), the character with the most */ |
|
|
|
|
/* variants is U+908A, having 8 such IVS. */ |
|
|
|
|
/* */ |
|
|
|
|
/* Adobe and MS decided to support IVS with a new cmap subtable */ |
|
|
|
|
/* (format 14). It is an odd subtable because it is not a mapping of */ |
|
|
|
|
/* input code points to glyphs, but contains lists of all variants */ |
|
|
|
|
/* supported by the font. */ |
|
|
|
|
/* */ |
|
|
|
|
/* A variant may be either `default' or `non-default'. A default */ |
|
|
|
|
/* variant is the one you will get for that code point if you look it */ |
|
|
|
|
/* up in the standard Unicode cmap. A non-default variant is a */ |
|
|
|
|
/* different glyph. */ |
|
|
|
|
/* */ |
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
|
/* <Function> */ |
|
|
|
@ -3023,10 +3164,13 @@ FT_BEGIN_HEADER |
|
|
|
|
/* the file. This is done to ensure that value 0 always corresponds */ |
|
|
|
|
/* to the `missing glyph'. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Note> */ |
|
|
|
|
/* This function is only meaningful if: */ |
|
|
|
|
/* a) the font has a variation selector cmap sub table */ |
|
|
|
|
/* b) the current charmap has a Unicode encoding */ |
|
|
|
|
/* This function is only meaningful if */ |
|
|
|
|
/* a) the font has a variation selector cmap sub table, */ |
|
|
|
|
/* and */ |
|
|
|
|
/* b) the current charmap has a Unicode encoding. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Since> */ |
|
|
|
|
/* 2.3.6 */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_UInt ) |
|
|
|
|
FT_Face_GetCharVariantIndex( FT_Face face, |
|
|
|
@ -3061,6 +3205,9 @@ FT_BEGIN_HEADER |
|
|
|
|
/* This function is only meaningful if the font has a variation */ |
|
|
|
|
/* selector cmap subtable. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Since> */ |
|
|
|
|
/* 2.3.6 */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_Int ) |
|
|
|
|
FT_Face_GetCharVariantIsDefault( FT_Face face, |
|
|
|
|
FT_ULong charcode, |
|
|
|
@ -3077,16 +3224,20 @@ FT_BEGIN_HEADER |
|
|
|
|
/* in the font. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* face :: A handle to the source face object. */ |
|
|
|
|
/* face :: */ |
|
|
|
|
/* A handle to the source face object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* A pointer to an array of selector code points, or NULL if there is */ |
|
|
|
|
/* no valid variant selector cmap subtable. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Note> */ |
|
|
|
|
/* the last item in the array is 0. the array is owned by the FT_Face */ |
|
|
|
|
/* but can be overwritten or released on the next call to a FreeType */ |
|
|
|
|
/* function. */ |
|
|
|
|
/* The last item in the array is 0; the array is owned by the */ |
|
|
|
|
/* @FT_Face object but can be overwritten or released on the next */ |
|
|
|
|
/* call to a FreeType function. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Since> */ |
|
|
|
|
/* 2.3.6 */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_UInt32* ) |
|
|
|
|
FT_Face_GetVariantSelectors( FT_Face face ); |
|
|
|
@ -3114,9 +3265,12 @@ FT_BEGIN_HEADER |
|
|
|
|
/* is empty. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Note> */ |
|
|
|
|
/* the last item in the array is 0. the array is owned by the FT_Face */ |
|
|
|
|
/* but can be overwritten or released on the next call to a FreeType */ |
|
|
|
|
/* function. */ |
|
|
|
|
/* The last item in the array is 0; the array is owned by the */ |
|
|
|
|
/* @FT_Face object but can be overwritten or released on the next */ |
|
|
|
|
/* call to a FreeType function. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Since> */ |
|
|
|
|
/* 2.3.6 */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_UInt32* ) |
|
|
|
|
FT_Face_GetVariantsOfChar( FT_Face face, |
|
|
|
@ -3145,117 +3299,18 @@ FT_BEGIN_HEADER |
|
|
|
|
/* is no valid cmap or the variant selector is invalid. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Note> */ |
|
|
|
|
/* the last item in the array is 0. the array is owned by the FT_Face */ |
|
|
|
|
/* but can be overwritten or released on the next call to a FreeType */ |
|
|
|
|
/* function. */ |
|
|
|
|
/* The last item in the array is 0; the array is owned by the */ |
|
|
|
|
/* @FT_Face object but can be overwritten or released on the next */ |
|
|
|
|
/* call to a FreeType function. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Since> */ |
|
|
|
|
/* 2.3.6 */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_UInt32* ) |
|
|
|
|
FT_Face_GetCharsOfVariant( FT_Face face, |
|
|
|
|
FT_ULong variantSelector ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
|
/* <Function> */ |
|
|
|
|
/* FT_Get_Name_Index */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Description> */ |
|
|
|
|
/* Return the glyph index of a given glyph name. This function uses */ |
|
|
|
|
/* driver specific objects to do the translation. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* face :: A handle to the source face object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* glyph_name :: The glyph name. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* The glyph index. 0 means `undefined character code'. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_EXPORT( FT_UInt ) |
|
|
|
|
FT_Get_Name_Index( FT_Face face, |
|
|
|
|
FT_String* glyph_name ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* |
|
|
|
|
* @macro: |
|
|
|
|
* FT_SUBGLYPH_FLAG_XXX |
|
|
|
|
* |
|
|
|
|
* @description: |
|
|
|
|
* A list of constants used to describe subglyphs. Please refer to the |
|
|
|
|
* TrueType specification for the meaning of the various flags. |
|
|
|
|
* |
|
|
|
|
* @values: |
|
|
|
|
* FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_SCALE :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_XY_SCALE :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_2X2 :: |
|
|
|
|
* FT_SUBGLYPH_FLAG_USE_MY_METRICS :: |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_SCALE 8 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_2X2 0x80 |
|
|
|
|
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* |
|
|
|
|
* @func: |
|
|
|
|
* FT_Get_SubGlyph_Info |
|
|
|
|
* |
|
|
|
|
* @description: |
|
|
|
|
* Retrieve a description of a given subglyph. Only use it if |
|
|
|
|
* `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE, or an error is |
|
|
|
|
* returned. |
|
|
|
|
* |
|
|
|
|
* @input: |
|
|
|
|
* glyph :: |
|
|
|
|
* The source glyph slot. |
|
|
|
|
* |
|
|
|
|
* sub_index :: |
|
|
|
|
* The index of subglyph. Must be less than `glyph->num_subglyphs'. |
|
|
|
|
* |
|
|
|
|
* @output: |
|
|
|
|
* p_index :: |
|
|
|
|
* The glyph index of the subglyph. |
|
|
|
|
* |
|
|
|
|
* p_flags :: |
|
|
|
|
* The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. |
|
|
|
|
* |
|
|
|
|
* p_arg1 :: |
|
|
|
|
* The subglyph's first argument (if any). |
|
|
|
|
* |
|
|
|
|
* p_arg2 :: |
|
|
|
|
* The subglyph's second argument (if any). |
|
|
|
|
* |
|
|
|
|
* p_transform :: |
|
|
|
|
* The subglyph transformation (if any). |
|
|
|
|
* |
|
|
|
|
* @return: |
|
|
|
|
* FreeType error code. 0 means success. |
|
|
|
|
* |
|
|
|
|
* @note: |
|
|
|
|
* The values of `*p_arg1', `*p_arg2', and `*p_transform' must be |
|
|
|
|
* interpreted depending on the flags returned in `*p_flags'. See the |
|
|
|
|
* TrueType specification for details. |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
FT_EXPORT( FT_Error ) |
|
|
|
|
FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, |
|
|
|
|
FT_UInt sub_index, |
|
|
|
|
FT_Int *p_index, |
|
|
|
|
FT_UInt *p_flags, |
|
|
|
|
FT_Int *p_arg1, |
|
|
|
|
FT_Int *p_arg2, |
|
|
|
|
FT_Matrix *p_transform ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
|
/* */ |
|
|
|
|
/* <Section> */ |
|
|
|
|