19-ft-color-ifdef.patch (1330B)
1 # HG changeset patch 2 # User Jonathan Kew <jkew@mozilla.com> 3 # Date 1713898119 -3600 4 # Tue Apr 23 19:48:39 2024 +0100 5 # Node ID 2e47d112a6cf17da455d80727fdd7c96d02e48d0 6 # Parent c4a8e2e58b280f250a5741e35f986957a4db3f86 7 Bug 1892913 - patch 17 - Add missing #include FT_COLOR_H to cairo-ft-font.c 8 9 diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-font.c 10 --- a/gfx/cairo/cairo/src/cairo-ft-font.c 11 +++ b/gfx/cairo/cairo/src/cairo-ft-font.c 12 @@ -66,6 +66,10 @@ 13 #include FT_SYNTHESIS_H 14 #endif 15 16 +#ifdef FT_COLOR_H 17 +#include FT_COLOR_H 18 +#endif 19 + 20 #if HAVE_FT_LIBRARY_SETLCDFILTER 21 #include FT_LCD_FILTER_H 22 #endif 23 @@ -2597,6 +2601,7 @@ static void 24 } 25 26 27 +#ifdef FT_COLOR_H 28 static void 29 _cairo_ft_scaled_glyph_set_palette (cairo_ft_scaled_font_t *scaled_font, 30 FT_Face face, 31 @@ -2637,6 +2642,20 @@ static void 32 if (entries_ret) 33 *entries_ret = entries; 34 } 35 +#else 36 +static void 37 +_cairo_ft_scaled_glyph_set_palette (cairo_ft_scaled_font_t *scaled_font, 38 + FT_Face face, 39 + unsigned int *num_entries_ret, 40 + void **entries_ret) 41 +{ 42 + if (num_entries_ret) 43 + *num_entries_ret = 0; 44 + 45 + if (entries_ret) 46 + *entries_ret = NULL; 47 +} 48 +#endif 49 50 /* returns TRUE if foreground color used */ 51 static cairo_bool_t