diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-02-18 01:27:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 01:27:10 +0300 |
commit | 4734b2b85073c775145bce1dd7deefd064003bda (patch) | |
tree | 88513eb653d223b77f869a323399d9a933dbc00b /alacritty/src/config/window.rs | |
parent | aaab88c5c5c94e11ffa3704407a3547cfabe4567 (diff) | |
download | r-alacritty-4734b2b85073c775145bce1dd7deefd064003bda.tar.gz r-alacritty-4734b2b85073c775145bce1dd7deefd064003bda.tar.bz2 r-alacritty-4734b2b85073c775145bce1dd7deefd064003bda.zip |
Don't load font twice during display creation
This commit finishes the effort from a64553b to avoid reloading font
twice during startup, since the original issue is with getting font
metrics without building the glyph cache.
Diffstat (limited to 'alacritty/src/config/window.rs')
-rw-r--r-- | alacritty/src/config/window.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty/src/config/window.rs b/alacritty/src/config/window.rs index 507a4f2c..f181289a 100644 --- a/alacritty/src/config/window.rs +++ b/alacritty/src/config/window.rs @@ -85,9 +85,9 @@ impl WindowConfig { } #[inline] - pub fn padding(&self, dpr: f64) -> (f32, f32) { - let padding_x = (f32::from(self.padding.x) * dpr as f32).floor(); - let padding_y = (f32::from(self.padding.y) * dpr as f32).floor(); + pub fn padding(&self, scale_factor: f64) -> (f32, f32) { + let padding_x = (f32::from(self.padding.x) * scale_factor as f32).floor(); + let padding_y = (f32::from(self.padding.y) * scale_factor as f32).floor(); (padding_x, padding_y) } |