Commit 7542f030ecdf61856b7bb4af9f3d918bd64c89c9

Werner Lemberg 2018-06-11T12:46:56

Finish CPAL/COLR support (1/4). * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'.

diff --git a/ChangeLog b/ChangeLog
index f02a24c..b69f740 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-06-12  Werner Lemberg  <wl@gnu.org>
 
+	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  <wl@gnu.org>
+
 	[sfnt] Minor.
 
 	* src/sfnt/ttcolr.c (tt_face_load_colr_layers):
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index c5e362e..4d63148 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1400,6 +1400,22 @@ FT_BEGIN_HEADER
    *     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 @@ FT_BEGIN_HEADER
 
     /* 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;
 
 
     /************************************************************************