Fix MSDF fonts color modulation.
This commit is contained in:
parent
e27b61d291
commit
fbcb98855d
2 changed files with 4 additions and 4 deletions
modules
|
@ -3229,7 +3229,7 @@ void TextServerAdvanced::font_draw_glyph(const RID &p_font_rid, const RID &p_can
|
||||||
if (gl.texture_idx != -1) {
|
if (gl.texture_idx != -1) {
|
||||||
Color modulate = p_color;
|
Color modulate = p_color;
|
||||||
#ifdef MODULE_FREETYPE_ENABLED
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
if (fd->cache[size]->face && (fd->cache[size]->textures[gl.texture_idx].format == Image::FORMAT_RGBA8) && !lcd_aa) {
|
if (fd->cache[size]->face && (fd->cache[size]->textures[gl.texture_idx].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
|
||||||
|
@ -3321,7 +3321,7 @@ void TextServerAdvanced::font_draw_glyph_outline(const RID &p_font_rid, const RI
|
||||||
if (gl.texture_idx != -1) {
|
if (gl.texture_idx != -1) {
|
||||||
Color modulate = p_color;
|
Color modulate = p_color;
|
||||||
#ifdef MODULE_FREETYPE_ENABLED
|
#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) && !lcd_aa && !fd->msdf) {
|
||||||
modulate.r = modulate.g = modulate.b = 1.0;
|
modulate.r = modulate.g = modulate.b = 1.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2286,7 +2286,7 @@ void TextServerFallback::font_draw_glyph(const RID &p_font_rid, const RID &p_can
|
||||||
if (gl.texture_idx != -1) {
|
if (gl.texture_idx != -1) {
|
||||||
Color modulate = p_color;
|
Color modulate = p_color;
|
||||||
#ifdef MODULE_FREETYPE_ENABLED
|
#ifdef MODULE_FREETYPE_ENABLED
|
||||||
if (fd->cache[size]->face && (fd->cache[size]->textures[gl.texture_idx].format == Image::FORMAT_RGBA8) && !lcd_aa) {
|
if (fd->cache[size]->face && (fd->cache[size]->textures[gl.texture_idx].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
|
||||||
|
@ -2378,7 +2378,7 @@ void TextServerFallback::font_draw_glyph_outline(const RID &p_font_rid, const RI
|
||||||
if (gl.texture_idx != -1) {
|
if (gl.texture_idx != -1) {
|
||||||
Color modulate = p_color;
|
Color modulate = p_color;
|
||||||
#ifdef MODULE_FREETYPE_ENABLED
|
#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) && !lcd_aa && !fd->msdf) {
|
||||||
modulate.r = modulate.g = modulate.b = 1.0;
|
modulate.r = modulate.g = modulate.b = 1.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue