Skip to content

Commit

Permalink
Fix color modulation of the grayscale glyphs in font with mixed color…
Browse files Browse the repository at this point in the history
… / grayscale data.
  • Loading branch information
bruvzg committed Aug 22, 2022
1 parent cdced05 commit 4d0c0f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/resources/dynamic_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4d0c0f3

Please sign in to comment.