mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data.
This commit is contained in:
parent
1fbf7b1ba5
commit
1c5a50fac6
@ -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
|
||||
|
@ -2122,7 +2122,7 @@ void TextServerFallback::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
|
||||
|
Loading…
Reference in New Issue
Block a user