ftcolor.h: Redesign API.

While going to implement it I noticed that I need access to most of
the `CPAL' elements; I thus plan to add a `cpal' field to
`TT_FaceRec', which makes most of the previously suggested API
functions obsolete because the fields will be directly accessable.
This commit is contained in:
Werner Lemberg 2018-06-06 17:49:17 +02:00
parent 7c7004d60c
commit f87ced9dc9
2 changed files with 43 additions and 1 deletions

View File

@ -1,3 +1,12 @@
2018-06-06 Werner Lemberg <wl@gnu.org>
ftcolor.h: Redesign API.
While going to implement it I noticed that I need access to most of
the `CPAL' elements; I thus plan to add a `cpal' field to
`TT_FaceRec', which makes most of the previously suggested API
functions obsolete because the fields will be directly accessable.
2018-06-06 Parth Wazurkar <parthwazurkar@gmail.com>
[bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.

View File

@ -167,7 +167,7 @@ FT_BEGIN_HEADER
* @since:
* 2.10
*/
typedef FT_Palette_ {
typedef struct FT_Palette_ {
FT_UShort num_palettes;
const FT_UShort* palette_name_ids;
const FT_UShort* palette_types;
@ -178,6 +178,39 @@ FT_BEGIN_HEADER
} FT_Palette;
/**************************************************************************
*
* @func:
* FT_Palette_Get
*
* @description:
* Retrieve the face's color palette data.
*
* @input:
* face ::
* The source face handle.
*
* @output:
* apalette ::
* A pointer to an @FT_Palette structure.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
* All arrays in the returned @FT_Palette structure are read-only.
*
* This function always returns an error if the config macro
* `TT_CONFIG_OPTION_COLOR_LAYERS' is not defined in `ftoption.h'.
*
* @since:
* 2.10
*/
FT_EXPORT( FT_Error )
FT_Palette_Get( FT_Face face,
FT_Palette *apalette );
/**************************************************************************
*
* @func: