From 1f08f28808544d52dbbddb0b8376bad870ae5c50 Mon Sep 17 00:00:00 2001 From: David Tschumperle Date: Sat, 16 Sep 2023 18:48:26 +0200 Subject: [PATCH] 'draw_text()': Fix coloring issues. --- CImg.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CImg.h b/CImg.h index 70af8dbe..844a313d 100644 --- a/CImg.h +++ b/CImg.h @@ -50721,9 +50721,12 @@ namespace cimg_library { const int posx = x + left_paddings[i] + padding_x; for (unsigned int c = 0; c<_spectrum; c+=letter._spectrum) { + if (c) letter = font[ch]; const unsigned int cmin = std::min(_spectrum - c,letter._spectrum); - if (foreground_color[c]!=255) - for (unsigned int d = 0; d