From 7542f030ecdf61856b7bb4af9f3d918bd64c89c9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 11 Jun 2018 12:46:56 +0200 Subject: [PATCH] Finish CPAL/COLR support (1/4). * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'. --- ChangeLog | 8 ++++++++ include/freetype/internal/tttypes.h | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index f02a24c36..b69f74045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-06-12 Werner Lemberg + + 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 [sfnt] Minor. diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index c5e362ef7..4d6314800 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; /************************************************************************