diff --git a/ChangeLog b/ChangeLog index 33fa5a528..eee310039 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2021-01-13 Dominik Röttsches + + Add config option to test for 'COLR' v1 support in headers. + + * include/freetype/config/ftoption.h (TT_SUPPORT_COLRV1): New macro + so that clients can test whether the FreeType checkout that they are + building against supports the 'COLR' v1 API. This is intended to be + a temporary solution until 'COLR' v1 support is released in a + FreeType version and such a check can be made by using the version + number instead. + 2020-12-16 Dominik Röttsches [base] Fill 'COLR' v1 API templates to make them work (#59703). diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h index 147fe6da2..d013a6243 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -978,6 +978,21 @@ FT_BEGIN_HEADER #endif + /* + * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this + * version of FreeType has support for 'COLR' v1 API. This definition is + * useful to FreeType clients that want to build in support for 'COLR' v1 + * depending on a tip-of-tree checkout before it is officially released in + * FreeType, and while the feature cannot yet be tested against using + * version macros. Don't change this macro. This may be removed once the + * feature is in a FreeType release version and version macros can be used + * to test for availability. + */ +#ifdef TT_CONFIG_OPTION_COLOR_LAYERS +#define TT_SUPPORT_COLRV1 +#endif + + /* * Check CFF darkening parameters. The checks are the same as in function * `cff_property_set` in file `cffdrivr.c`.