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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
diff --git a/ChangeLog b/ChangeLog
index 674da28..db224a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
index c119981..3abe402 100644
--- a/include/freetype/ftcolor.h
+++ b/include/freetype/ftcolor.h
@@ -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;
@@ -181,6 +181,39 @@ FT_BEGIN_HEADER
/**************************************************************************
*
* @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:
* FT_Palette_Select
*
* @description: