diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 3298beb322c..3a0fb6d89cd 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1106,6 +1106,10 @@ 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(); + } + // Draw glyph outlines. const Color modulated_outline_color = font_outline_color * Color(1, 1, 1, font_color.a); const Color modulated_shadow_color = font_shadow_color * Color(1, 1, 1, font_color.a); @@ -1329,6 +1333,10 @@ 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(); + } + if (selected && use_selected_font_color) { font_color = theme_cache.font_selected_color; }