[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
This commit is contained in:
Behdad Esfahbod 2022-02-08 18:18:47 -06:00
parent 22f2c78c28
commit 9cc9ffe352
1 changed files with 3 additions and 1 deletions

View File

@ -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 *