From f97df9307aafd0f4f50c182a6603286936d4ec46 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 23 Apr 2021 21:03:10 -0700 Subject: [PATCH] fix scaling for square glyphs a copy-paste/transcription error had the y value divided by the cell width rather than the x value. refs: https://github.com/wez/wezterm/issues/707 --- wezterm-gui/src/glyphcache.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wezterm-gui/src/glyphcache.rs b/wezterm-gui/src/glyphcache.rs index 807a2f379..1e6e39337 100644 --- a/wezterm-gui/src/glyphcache.rs +++ b/wezterm-gui/src/glyphcache.rs @@ -478,8 +478,8 @@ impl GlyphCache { { // If we know the cap height ratio for both fonts, we can scale // the second one to match the cap height of the first - x_scale = base_cap / cap; - y_scale = x_scale / info.num_cells as f64; + y_scale = base_cap / cap; + x_scale = y_scale / info.num_cells as f64; } else { // Otherwise, we scale based on the ratio of the metrics for // the two fonts.