From e714e7d4f3d3bd1a49c460f6c3bd2c3f09192722 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 16 Aug 2023 09:54:08 -0700 Subject: [PATCH] [hb-view] Work around old cairo Fixes https://github.com/harfbuzz/harfbuzz/issues/4378 --- util/view-cairo.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/view-cairo.hh b/util/view-cairo.hh index d737b85dd..b44b77b44 100644 --- a/util/view-cairo.hh +++ b/util/view-cairo.hh @@ -202,6 +202,8 @@ view_cairo_t::render (const font_options_t *font_opts) cairo_restore (cr); } + // https://github.com/harfbuzz/harfbuzz/issues/4378 +#if CAIRO_VERSION >= 11700 if (l.num_clusters) cairo_show_text_glyphs (cr, l.utf8, l.utf8_len, @@ -209,6 +211,7 @@ view_cairo_t::render (const font_options_t *font_opts) l.clusters, l.num_clusters, l.cluster_flags); else +#endif cairo_show_glyphs (cr, l.glyphs, l.num_glyphs); }