From a5b00faaf8ec5f5aa6177efa87e8afff2bfa4f1a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 31 Mar 2025 14:28:31 -0600 Subject: [PATCH] Fix build with HB_NO_DRAW --- src/hb-config.hh | 1 + src/hb-font.hh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/hb-config.hh b/src/hb-config.hh index 40cc2403c..40fd1f6b4 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -146,6 +146,7 @@ #ifdef HB_NO_DRAW #define HB_NO_OUTLINE +#define HB_NO_PAINT #endif #ifdef HB_NO_GETENV diff --git a/src/hb-font.hh b/src/hb-font.hh index 0421eafd0..bf2d5d681 100644 --- a/src/hb-font.hh +++ b/src/hb-font.hh @@ -486,7 +486,12 @@ struct hb_font_t void draw_glyph (hb_codepoint_t glyph, hb_draw_funcs_t *draw_funcs, void *draw_data) { +#ifndef HB_NO_OUTLINE bool embolden = x_strength || y_strength; +#else + constexpr bool embolden = false; +#endif + if (!embolden) { klass->get.f.draw_glyph (this, user_data, @@ -496,6 +501,7 @@ struct hb_font_t return; } +#ifndef HB_NO_OUTLINE /* Emboldening. */ hb_outline_t outline; klass->get.f.draw_glyph (this, user_data, @@ -510,6 +516,7 @@ struct hb_font_t outline.embolden (x_strength, y_strength, x_shift, y_shift); outline.replay (draw_funcs, draw_data); +#endif } void paint_glyph (hb_codepoint_t glyph,