From b7b4d8203a82218636a881add69840ad1b96e7f1 Mon Sep 17 00:00:00 2001 From: Benjamin Vedder Date: Wed, 27 Nov 2024 20:35:47 +0100 Subject: [PATCH] Squashed 'main/lispBM/' changes from f0c1ec21..decc7d52 decc7d52 Merge pull request #23 from r3n33/fix/rotated-text-spacing fa2a57c2 Fix character spacing when text is rotated git-subtree-dir: main/lispBM git-subtree-split: decc7d52220f062fe43dd45652895de177df7b64 --- src/extensions/display_extensions.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/extensions/display_extensions.c b/src/extensions/display_extensions.c index 43f097e..ed54fdf 100644 --- a/src/extensions/display_extensions.c +++ b/src/extensions/display_extensions.c @@ -2605,8 +2605,15 @@ static lbm_value ext_text(lbm_value *args, lbm_uint argn) { int ind = 0; while (txt[ind] != 0) { - img_putc(&img_buf, x + ind * w * incx, y + ind * h * incy, - (uint32_t *)colors, 4, font_data, (uint8_t)txt[ind], up, down); + img_putc(&img_buf, + x + ind * ((up || down) ? h : w) * incx, + y + ind * ((up || down) ? w : h) * incy, + (uint32_t *)colors, + 4, + font_data, + (uint8_t)txt[ind], + up, + down); ind++; }