Fix colored font rendered in wrong size

Fix #24456

The character->rect.size is properly update at DynamicFontAtSize::_bitmap_to_character
so no need to multiply scale again.

It was changed with 5cd12f6649
This commit is contained in:
volzhs 2018-12-19 03:54:51 +09:00
parent 89abfd40ed
commit e577093965

View file

@ -352,7 +352,7 @@ float DynamicFontAtSize::draw_char(RID p_canvas_item, const Point2 &p_pos, CharT
modulate.r = modulate.g = modulate.b = 1.0; modulate.r = modulate.g = modulate.b = 1.0;
} }
RID texture = font->textures[ch->texture_idx].texture->get_rid(); RID texture = font->textures[ch->texture_idx].texture->get_rid();
VisualServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas_item, Rect2(cpos, ch->rect.size * Vector2(font->scale_color_font, font->scale_color_font)), texture, ch->rect_uv, modulate, false, RID(), false); VisualServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas_item, Rect2(cpos, ch->rect.size), texture, ch->rect_uv, modulate, false, RID(), false);
} }
advance = ch->advance; advance = ch->advance;