I haven't got time to fully review the API. But just taking a look now, in the example in freetype.h:
* if ( palette && layer_glyph_index )
* {
* do
* {
* FT_Color layer_color = palette[layer_color_index];
*
*
* // Load and render glyph `layer_glyph_index', then
* // blend resulting pixmap with previously created pixmaps.
*
* } while ( ( layer_glyph_index =
* FT_Get_Color_Glyph_Layer( face,
* glyph_index,
* &layer_color_index,
* &iterator ) ) != 0 );
* }
First, I think the use of a FT_LayerIterator type is unnecessary. A single index could have done.
Second, the use of 0 return value to signify end of iteration is problematic given that 0 is a valid glyph index that can appear in the layers itself.