ref: 7542f030ecdf61856b7bb4af9f3d918bd64c89c9
parent: 7de877bbc6282c820fcf18262ec4c7bb7dcccc33
author: Werner Lemberg <[email protected]>
date: Mon Jun 11 08:46:56 EDT 2018
Finish CPAL/COLR support (1/4). * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2018-06-12 Werner Lemberg <[email protected]>
+ Finish CPAL/COLR support (1/4).
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
+ `palette_index', `palette', `have_foreground_color' and
+ `foreground_color'.
+
+2018-06-12 Werner Lemberg <[email protected]>
+
[sfnt] Minor.
* src/sfnt/ttcolr.c (tt_face_load_colr_layers):
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1400,6 +1400,22 @@
* file `ttconfig.h' for comments on the
* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.
*
+ * palette_data ::
+ * Some fields from the `CPAL' table that are directly indexed.
+ *
+ * palette_index ::
+ * The current palette index, as set by @FT_Palette_Select.
+ *
+ * palette ::
+ * An array containing the current palette's colors.
+ *
+ * have_foreground_color ::
+ * There was a call to @FT_Palette_Set_Foreground_Color.
+ *
+ * foreground_color ::
+ * The current foreground color corresponding to `CPAL' color index
+ * 0xFFFF. Only valid if `have_foreground_color' is set.
+ *
* font_program_size ::
* Size in bytecodes of the face's font
* program. 0 if none defined. Ignored for
@@ -1660,6 +1676,10 @@
/* glyph colors */
FT_Palette_Data palette_data; /* since 2.10 */
+ FT_UShort palette_index;
+ FT_Color* palette;
+ FT_Bool have_foreground_color;
+ FT_Color foreground_color;
/************************************************************************