mirror of
https://github.com/wez/wezterm.git
synced 2024-09-21 03:39:16 +03:00
wezterm: fix x-scale calculation
Need to account for the number of cells occupied by the glyph, otherwise we'll always scale to a single cell for double width glyphs. refs: #342
This commit is contained in:
parent
215a3bb297
commit
bbb953610d
@ -197,7 +197,8 @@ impl<T: Texture2d> GlyphCache<T> {
|
||||
}
|
||||
|
||||
let y_scale = base_metrics.cell_height.get() / idx_metrics.cell_height.get();
|
||||
let x_scale = base_metrics.cell_width.get() / idx_metrics.cell_width.get();
|
||||
let x_scale =
|
||||
base_metrics.cell_width.get() / (idx_metrics.cell_width.get() / info.num_cells as f64);
|
||||
|
||||
let aspect = (idx_metrics.cell_height / idx_metrics.cell_width).get();
|
||||
let is_square = aspect >= 0.9 && aspect <= 1.1;
|
||||
|
Loading…
Reference in New Issue
Block a user