You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Don't apply font color to colored emojis
Partial revert of the change in #102880, cherry-picked to 4.4.1. Co-authored-by: Pāvels Nadtočajevs <7645683+bruvzg@users.noreply.github.com>
This commit is contained in:
@@ -3808,7 +3808,7 @@ void TextServerAdvanced::_font_draw_glyph(const RID &p_font_rid, const RID &p_ca
|
|||||||
if (fgl.texture_idx != -1) {
|
if (fgl.texture_idx != -1) {
|
||||||
Color modulate = p_color;
|
Color modulate = p_color;
|
||||||
#ifdef MODULE_FREETYPE_ENABLED
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
if (!fgl.from_svg && ffsd->face && ffsd->textures[fgl.texture_idx].image.is_valid() && (ffsd->textures[fgl.texture_idx].image->get_format() == Image::FORMAT_RGBA8) && !lcd_aa && !fd->msdf) {
|
if (ffsd->face && ffsd->textures[fgl.texture_idx].image.is_valid() && (ffsd->textures[fgl.texture_idx].image->get_format() == Image::FORMAT_RGBA8) && !lcd_aa && !fd->msdf) {
|
||||||
modulate.r = modulate.g = modulate.b = 1.0;
|
modulate.r = modulate.g = modulate.b = 1.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2739,7 +2739,7 @@ void TextServerFallback::_font_draw_glyph(const RID &p_font_rid, const RID &p_ca
|
|||||||
if (fgl.texture_idx != -1) {
|
if (fgl.texture_idx != -1) {
|
||||||
Color modulate = p_color;
|
Color modulate = p_color;
|
||||||
#ifdef MODULE_FREETYPE_ENABLED
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
if (!fgl.from_svg && ffsd->face && ffsd->textures[fgl.texture_idx].image.is_valid() && (ffsd->textures[fgl.texture_idx].image->get_format() == Image::FORMAT_RGBA8) && !lcd_aa && !fd->msdf) {
|
if (ffsd->face && ffsd->textures[fgl.texture_idx].image.is_valid() && (ffsd->textures[fgl.texture_idx].image->get_format() == Image::FORMAT_RGBA8) && !lcd_aa && !fd->msdf) {
|
||||||
modulate.r = modulate.g = modulate.b = 1.0;
|
modulate.r = modulate.g = modulate.b = 1.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user