From 1cd62c2b1c7050f4f1cfef6dc2f0f1269f096f09 Mon Sep 17 00:00:00 2001 From: meehl <12648828+meehl@users.noreply.github.com> Date: Tue, 18 Aug 2026 11:04:34 +0200 Subject: [PATCH] Fix absolute positioning of text --- src/draw_commands.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/draw_commands.rs b/src/draw_commands.rs index 505031a..32531d6 100644 --- a/src/draw_commands.rs +++ b/src/draw_commands.rs @@ -136,12 +136,14 @@ impl DrawCommandRecorder { layer_idx: u32, is_absolute_position: bool, ) { - if !is_absolute_position { - rect.translate(self.current_viewport.min.to_vector()); - } + let rect = if is_absolute_position { + rect + } else { + rect.translate(self.current_viewport.min.to_vector()) + }; self.push(DrawCommand { - positions: rect.translate(self.current_viewport.min.to_vector()).into(), + positions: rect.into(), uvs: uv.into(), color, // font atlas always lives at default texture ID