From aaf4629c052c3b700380097e9f8cc6b2bba3fc6d Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 27 Dec 2020 22:03:09 +0000 Subject: [PATCH] Fix potential canvas.cv_font / cv_font inconsistency in gr_ustring A prior conversion changed the actual rendering to use the argument cv_font, but still picked which render function to use based on the flags for the active font. Switch to use only the supplied font. --- similar/2d/font.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/similar/2d/font.cpp b/similar/2d/font.cpp index 5845d5cce..24e5e9fcb 100644 --- a/similar/2d/font.cpp +++ b/similar/2d/font.cpp @@ -766,9 +766,8 @@ void gr_ustring(grs_canvas &canvas, const grs_font &cv_font, const int x, const } #endif - if (canvas.cv_font->ft_flags & FT_COLOR) { + if (cv_font.ft_flags & FT_COLOR) gr_internal_color_string(canvas, cv_font, x, y, s); - } else gr_ustring_mono(canvas, cv_font, x, y, s); }