[ft-colr] Conditionalize on (unreleased0 FreeType 2.13.0

That's the version that the color API is called stable, and
includes changes that we rely on.
This commit is contained in:
Behdad Esfahbod committed 2023-01-26 13:27:55 -07:00
1 parent 281db89a68
commit e377888990
2 files changed
+8 -8

No files matched your search

+5 -5
View File
@@ -30,18 +30,18 @@
#ifdef HB_HAS_FREETYPE
#include <hb-ft.h>
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21101
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300
#include FT_COLOR_H
#endif
static inline hb_bool_t
have_ft_colrv1 (void)
{
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21101
// https://github.com/harfbuzz/harfbuzz/issues/4013
return sizeof (FT_ColorStop) == 2 * sizeof (FT_Fixed);
#endif
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300
return TRUE;
#else
return FALSE;
#endif
}
#endif