From 4d0c0f3ffac92a7239d321001650367730ef8667 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 22 Aug 2022 20:39:18 +0300 Subject: [PATCH] Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data. --- scene/resources/dynamic_font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 32126b317e3..01f571989c6 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -523,7 +523,7 @@ float DynamicFontAtSize::draw_char(RID p_canvas_item, const Point2 &p_pos, CharT cpos.y -= font->get_ascent(); cpos.y += ch->v_align; Color modulate = p_modulate; - if (FT_HAS_COLOR(font->face)) { + if (font->textures[ch->texture_idx].texture->get_format() == Image::FORMAT_RGBA8) { modulate.r = modulate.g = modulate.b = 1.0; } RID texture = font->textures[ch->texture_idx].texture->get_rid();