From 9cc9ffe3523980fad86ea9950cf82a53b79a9583 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 8 Feb 2022 18:18:47 -0600 Subject: [PATCH] [util/draw] If HB_DRAW is not set, choose depending on cairo version If HB_DRAW=0, don't use it, if HB_DRAW=1, use it, if unset, choose depending on cairo version --- util/helper-cairo.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/helper-cairo.hh b/util/helper-cairo.hh index d0c7f9c82..d1357c135 100644 --- a/util/helper-cairo.hh +++ b/util/helper-cairo.hh @@ -70,7 +70,9 @@ static inline bool helper_cairo_use_hb_draw (const font_options_t *font_opts) { const char *env = getenv ("HB_DRAW"); - return env && atoi (env); + if (!env) + return cairo_version () >= CAIRO_VERSION_ENCODE (1, 17, 5); + return atoi (env); } static inline cairo_scaled_font_t *