diff options
author | volzhs <volzhs@gmail.com> | 2018-12-19 03:54:51 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2018-12-19 03:54:51 +0900 |
commit | e57709396537807c55ce05352137fde8c6a510f4 (patch) | |
tree | e536059096b4062a81969978a7f83b407ccd9413 | |
parent | 89abfd40ed0904e680ae53ba91efcc4205bccb95 (diff) |
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 5cd12f6649387f91d08fd17bf3c70e732798ab58
-rw-r--r-- | scene/resources/dynamic_font.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index ad22d6530c..619165dc2a 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -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; } 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; |