[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 2023-01-26 13:26:47 -07:00
parent 281db89a68
commit e377888990
2 changed files with 8 additions and 8 deletions

View File

@ -45,7 +45,7 @@
#include FT_MULTIPLE_MASTERS_H #include FT_MULTIPLE_MASTERS_H
#include FT_OUTLINE_H #include FT_OUTLINE_H
#include FT_TRUETYPE_TABLES_H #include FT_TRUETYPE_TABLES_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 #include FT_COLOR_H
#endif #endif
@ -851,7 +851,7 @@ hb_ft_draw_glyph (hb_font_t *font HB_UNUSED,
#endif #endif
#ifndef HB_NO_PAINT #ifndef HB_NO_PAINT
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21101 #if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300
#include "hb-ft-colr.hh" #include "hb-ft-colr.hh"
@ -972,7 +972,7 @@ static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft
#endif #endif
#ifndef HB_NO_PAINT #ifndef HB_NO_PAINT
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21101 #if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300
hb_font_funcs_set_paint_glyph_func (funcs, hb_ft_paint_glyph, nullptr, nullptr); hb_font_funcs_set_paint_glyph_func (funcs, hb_ft_paint_glyph, nullptr, nullptr);
#endif #endif
#endif #endif

View File

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