Skip to content

Commit

Permalink
Fix colored font rendered in wrong size
Browse files Browse the repository at this point in the history
Fix godotengine#24456

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

It was changed with 5cd12f6
  • Loading branch information
volzhs committed Dec 18, 2018
1 parent 89abfd4 commit e577093
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 @@ -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;
Expand Down

0 comments on commit e577093

Please sign in to comment.