Finish CPAL/COLR support (1/4). * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'.
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
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;
/************************************************************************