shithub: freetype+ttf2subf

Download patch

ref: 53fea877458e7d47b53e924c3710bbe739651ed2
parent: 4b58cf47cc5cd3ffc203f5fbe26865f4634ffc70
author: Dominik Röttsches <drott@chromium.org>
date: Thu Jan 14 11:06:03 EST 2021

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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2021-01-13  Dominik Röttsches  <drott@chromium.org>
+
+	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  <drott@chromium.org>
 
 	[base] Fill 'COLR' v1 API templates to make them work (#59703).
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -979,6 +979,21 @@
 
 
   /*
+   * 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`.
    */