From 024261672abf3a50121a8029882da07809acc3d5 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 2 Feb 2022 08:46:10 -0700 Subject: [PATCH] maybe really fix the alignment issues! refs: #1570 refs: #1607 refs: #1563 --- wezterm-gui/src/termwindow/render.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wezterm-gui/src/termwindow/render.rs b/wezterm-gui/src/termwindow/render.rs index 1f0dff585..e047e4a06 100644 --- a/wezterm-gui/src/termwindow/render.rs +++ b/wezterm-gui/src/termwindow/render.rs @@ -1989,8 +1989,7 @@ impl super::TermWindow { in_composition, }); - let pos_x = (self.dimensions.pixel_width as f32 / -2.) - + params.left_pixel_x + let pos_x = params.left_pixel_x + cluster_x_pos + if params.use_pixel_positioning { (glyph.x_offset + glyph.bearing_x).get() as f32 @@ -2007,6 +2006,7 @@ impl super::TermWindow { ); break; } + let pos_x = (self.dimensions.pixel_width as f32 / -2.) + pos_x; let pixel_width = glyph.x_advance.get() as f32; @@ -2224,13 +2224,7 @@ impl super::TermWindow { cluster.width as f32 * cell_width }; } - Direction::LeftToRight => { - if !params.use_pixel_positioning { - // Ensure clusters are aligned to cell boundaries - cluster_x_pos += - (item.cluster.width as f32 * cell_width) - item.pixel_width; - } - } + Direction::LeftToRight => {} } }