Merge pull request #82970 from bruvzg/rtl_round

[RTL] Remove unnecessary glyph position rounding.
This commit is contained in:
Rémi Verschelde 2023-10-09 15:35:32 +02:00
commit 4f85375b17
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1143,8 +1143,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
if (is_inside_tree() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) {
fx_offset = fx_offset.round();
}
Vector2i char_off = char_xform.get_origin();
Vector2 char_off = char_xform.get_origin();
// Draw glyph outlines.
const Color modulated_outline_color = font_outline_color * Color(1, 1, 1, font_color.a);
@ -1389,8 +1388,8 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
if (is_inside_tree() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) {
fx_offset = fx_offset.round();
}
Vector2 char_off = char_xform.get_origin();
Vector2i char_off = char_xform.get_origin();
Transform2D char_reverse_xform;
char_reverse_xform.set_origin(-char_off);
char_xform = char_xform * char_reverse_xform;