1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-24 07:46:59 +03:00

maybe really fix the alignment issues!

refs: #1570
refs: #1607
refs: #1563
This commit is contained in:
Wez Furlong 2022-02-02 08:46:10 -07:00
parent 6368198b4f
commit 024261672a

View File

@ -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 => {}
}
}