Fix build with HB_NO_DRAW

This commit is contained in:
Behdad Esfahbod committed 2025-03-31 14:29:16 -06:00
1 parent d53cbeee41
commit a5b00faaf8
2 files changed
+8

No files matched your search

+1
View File
@@ -146,6 +146,7 @@
#ifdef HB_NO_DRAW
#define HB_NO_OUTLINE
#define HB_NO_PAINT
#endif
#ifdef HB_NO_GETENV
+7
View File
@@ -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,