summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-02-04 15:48:27 +0100
committerMatthias Clasen <mclasen@redhat.com>2023-02-04 15:48:27 +0100
commit26b5ec3555bb462f9d74aa860b5714cb47cb149e (patch)
treef966559d29efe187ba44394c660a9da9aae35c84
parentfad3e7690845f128aa0beba9adaae7038c01269f (diff)
downloadpango-26b5ec3555bb462f9d74aa860b5714cb47cb149e.tar.gz
Drop an unnecessary conditional
It was added my mistake. This is not new harfbuzz api.
-rw-r--r--meson.build6
-rw-r--r--pango/shape.c22
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