Skip to content

Commit

Permalink
[RTL] Remove unnecessary glyph position rounding.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Oct 8, 2023
1 parent 6916349 commit 49595ca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 49595ca

Please sign in to comment.