From 6b3fe8ac1beeb97194e5171b5fe3873236879fdd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Feb 2023 17:00:14 -0700 Subject: [PATCH] [embolden] Semi-handle with negative scales --- src/hb-font.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-font.hh b/src/hb-font.hh index 7a5b7eddc..767382e7c 100644 --- a/src/hb-font.hh +++ b/src/hb-font.hh @@ -681,8 +681,8 @@ struct hb_font_t bool y_neg = y_scale < 0; y_mult = (y_neg ? -((int64_t) -y_scale << 16) : ((int64_t) y_scale << 16)) / upem; - x_shift = roundf (x_scale * x_embolden); - y_shift = roundf (y_scale * y_embolden); + x_shift = fabs (roundf (x_scale * x_embolden)); + y_shift = fabs (roundf (y_scale * y_embolden)); slant_xy = y_scale ? slant * x_scale / y_scale : 0.f;