From 1c5a50fac6346863f09181e7ee2cd0270ab4fda7 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 22 Aug 2022 20:46:25 +0300 Subject: Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data. --- modules/text_server_adv/text_server_adv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/text_server_adv') diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index c0cff08f13..f6180f6c4c 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -3065,7 +3065,7 @@ void TextServerAdvanced::font_draw_glyph(const RID &p_font_rid, const RID &p_can if (gl.texture_idx != -1) { Color modulate = p_color; #ifdef MODULE_FREETYPE_ENABLED - if (fd->cache[size]->face && FT_HAS_COLOR(fd->cache[size]->face)) { + if (fd->cache[size]->face && fd->cache[size]->textures[gl.texture_idx].format == Image::FORMAT_RGBA8) { modulate.r = modulate.g = modulate.b = 1.0; } #endif -- cgit v1.2.3