From 71a818cb8fcc99d1d9176fca3b3386c6971a306a Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 19 Sep 2019 23:15:06 +0200 Subject: [PATCH] Initialize only visible characters This fixes an off-by-two error in the renderer which initializes characters 32 until 128 (inclusive) for each font whenever it is loaded. The ascii visible range however just goes from 32 until 126 (inclusive). --- alacritty_terminal/src/renderer/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alacritty_terminal/src/renderer/mod.rs b/alacritty_terminal/src/renderer/mod.rs index 2a0529d..da2dfed 100644 --- a/alacritty_terminal/src/renderer/mod.rs +++ b/alacritty_terminal/src/renderer/mod.rs @@ -223,7 +223,7 @@ impl GlyphCache { fn load_glyphs_for_font(&mut self, font: FontKey, loader: &mut L) { let size = self.font_size; - for i in 32u8..=128u8 { + for i in 32u8..=126u8 { self.get(GlyphKey { font_key: font, c: i as char, size }, loader); } }