From 26b5ec3555bb462f9d74aa860b5714cb47cb149e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 4 Feb 2023 15:48:27 +0100 Subject: Drop an unnecessary conditional It was added my mistake. This is not new harfbuzz api. --- meson.build | 6 ------ pango/shape.c | 22 +++------------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/meson.build b/meson.build index 4bd43561..50ec14b9 100644 --- a/meson.build +++ b/meson.build @@ -247,12 +247,6 @@ harfbuzz_dep = dependency('harfbuzz', pango_deps += harfbuzz_dep -if harfbuzz_dep.type_name() != 'internal' - if cc.has_function('hb_ot_color_has_layers', dependencies: harfbuzz_dep) - pango_conf.set('HAVE_HB_OT_COLOR_HAS_LAYERS', 1) - endif -endif - # If option is 'auto' or 'enabled' it is not required to find fontconfig on the # system because a fallback is done at the end. Override 'disabled' option on # platforms that requires it. diff --git a/pango/shape.c b/pango/shape.c index a69207bf..e666bb3d 100644 --- a/pango/shape.c +++ b/pango/shape.c @@ -299,24 +299,6 @@ find_text_transform (const PangoAnalysis *analysis) return transform; } -static inline gboolean -face_has_layers (hb_face_t *face) -{ -#ifdef HAVE_HB_OT_COLOR_HAS_LAYERS - return hb_ot_color_has_layers (face); -#else - hb_blob_t *blob; - gboolean ret; - - blob = hb_face_reference_table (face, HB_TAG ('C','O','L','R')); - ret = blob != hb_blob_get_empty (); - - hb_blob_destroy (blob); - - return ret; -#endif -} - static gboolean font_has_color (hb_font_t *font) { @@ -324,7 +306,9 @@ font_has_color (hb_font_t *font) face = hb_font_get_face (font); - return face_has_layers (face) || hb_ot_color_has_png (face) || hb_ot_color_has_svg (face); + return hb_ot_color_has_layers (face) || + hb_ot_color_has_png (face) || + hb_ot_color_has_svg (face); } static gboolean -- cgit v1.2.1