From 4fe6ece425c19e8fd63e346179de5bd14415d732 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod <behdad@behdad.org> Date: Wed, 18 Jan 2023 22:33:56 -0700 Subject: [PATCH] [cairo] Don't fallback to CPAL if cairo doesn't support custom palette --- src/hb-cairo.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/hb-cairo.cc b/src/hb-cairo.cc index 67abd527b..074bb79be 100644 --- a/src/hb-cairo.cc +++ b/src/hb-cairo.cc @@ -329,16 +329,7 @@ hb_cairo_paint_custom_palette_color (hb_paint_funcs_t *funcs, cairo_font_options_destroy (options); #endif - // Fall back to the default palette - cairo_scaled_font_t *scaled_font = cairo_get_scaled_font (cr); - hb_font_t *font = hb_cairo_scaled_font_get_font (scaled_font); - hb_face_t *face = hb_font_get_face (font); - hb_color_t color; - unsigned int len = 1; - - hb_ot_color_palette_get_colors (face, 0, color_index, &len, &color); - - return color; + return HB_COLOR (0, 0, 0, 0); } static inline void free_static_cairo_paint_funcs ();