|
|
|
@ -4255,6 +4255,9 @@ FT_BEGIN_HEADER |
|
|
|
|
* same object again. |
|
|
|
|
* |
|
|
|
|
* @output: |
|
|
|
|
* aglyph_index :: |
|
|
|
|
* The glyph index of the current layer. |
|
|
|
|
* |
|
|
|
|
* acolor_index :: |
|
|
|
|
* The color index into the font face's color palette of the current |
|
|
|
|
* layer. The value 0xFFFF is special; it doesn't reference a palette |
|
|
|
@ -4264,9 +4267,9 @@ FT_BEGIN_HEADER |
|
|
|
|
* The color palette can be retrieved with @FT_Palette_Select. |
|
|
|
|
* |
|
|
|
|
* @return: |
|
|
|
|
* The glyph index of the current layer. If there are no more layers |
|
|
|
|
* (or if there are no layers at all), value~0 gets returned. In case |
|
|
|
|
* of an error, value~0 is returned also. |
|
|
|
|
* Value~1 if everything is OK. If there are no more layers (or if |
|
|
|
|
* there are no layers at all), value~0 gets returned. In case of an |
|
|
|
|
* error, value~0 is returned also. |
|
|
|
|
* |
|
|
|
|
* @note: |
|
|
|
|
* This function is necessary if you want to handle glyph layers by |
|
|
|
@ -4282,6 +4285,7 @@ FT_BEGIN_HEADER |
|
|
|
|
* FT_Color* palette; |
|
|
|
|
* FT_LayerIterator iterator; |
|
|
|
|
* |
|
|
|
|
* FT_Bool have_layers; |
|
|
|
|
* FT_UInt layer_glyph_index; |
|
|
|
|
* FT_UInt layer_color_index; |
|
|
|
|
* |
|
|
|
@ -4290,33 +4294,41 @@ FT_BEGIN_HEADER |
|
|
|
|
* if ( error ) |
|
|
|
|
* palette = NULL; |
|
|
|
|
* |
|
|
|
|
* iterator.p = NULL; |
|
|
|
|
* layer_glyph_index = FT_Get_Color_Glyph_Layer( face, |
|
|
|
|
* glyph_index, |
|
|
|
|
* &layer_color_index, |
|
|
|
|
* &iterator ); |
|
|
|
|
* iterator.p = NULL; |
|
|
|
|
* have_layers = FT_Get_Color_Glyph_Layer( face, |
|
|
|
|
* glyph_index, |
|
|
|
|
* &layer_glyph_index, |
|
|
|
|
* &layer_color_index, |
|
|
|
|
* &iterator ); |
|
|
|
|
* |
|
|
|
|
* if ( palette && layer_glyph_index ) |
|
|
|
|
* if ( palette && have_layers ) |
|
|
|
|
* { |
|
|
|
|
* do |
|
|
|
|
* { |
|
|
|
|
* FT_Color layer_color = palette[layer_color_index]; |
|
|
|
|
* FT_Color layer_color; |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* // Load and render glyph `layer_glyph_index', then
|
|
|
|
|
* // blend resulting pixmap with previously created pixmaps.
|
|
|
|
|
* if ( layer_color_index == 0xFFFF ) |
|
|
|
|
* layer_color = text_foreground_color; |
|
|
|
|
* else |
|
|
|
|
* layer_color = palette[layer_color_index]; |
|
|
|
|
* |
|
|
|
|
* } while ( ( layer_glyph_index = |
|
|
|
|
* FT_Get_Color_Glyph_Layer( face, |
|
|
|
|
* glyph_index, |
|
|
|
|
* &layer_color_index, |
|
|
|
|
* &iterator ) ) != 0 ); |
|
|
|
|
* // Load and render glyph `layer_glyph_index', then
|
|
|
|
|
* // blend resulting pixmap (using color `layer_color')
|
|
|
|
|
* // with previously created pixmaps.
|
|
|
|
|
* |
|
|
|
|
* } while ( FT_Get_Color_Glyph_Layer( face, |
|
|
|
|
* glyph_index, |
|
|
|
|
* &layer_glyph_index, |
|
|
|
|
* &layer_color_index, |
|
|
|
|
* &iterator ) ); |
|
|
|
|
* } |
|
|
|
|
* } |
|
|
|
|
*/ |
|
|
|
|
FT_EXPORT( FT_UInt ) |
|
|
|
|
FT_EXPORT( FT_Bool ) |
|
|
|
|
FT_Get_Color_Glyph_Layer( FT_Face face, |
|
|
|
|
FT_UInt base_glyph, |
|
|
|
|
FT_UInt *aglyph_index, |
|
|
|
|
FT_UInt *acolor_index, |
|
|
|
|
FT_LayerIterator* iterator ); |
|
|
|
|
|
|
|
|
|