From f7177101eda589596ab08866892bd4629bd1ef44 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Thu, 6 Jan 2022 00:45:06 +0300 Subject: Use builtin font for box drawing unicode characters This commit adds hand rolled drawing of unicode box drawing[1] and block elements[2] from ranges U+2500 up to U+259f. While using system font for such characters will look better most of the time, the characters tend to overlap or not align, so providing builtin font is the lesser evil here. [1] - https://www.unicode.org/charts/PDF/U2500.pdf [2] - https://www.unicode.org/charts/PDF/U2580.pdf Fixes #5485. --- alacritty/src/display/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'alacritty/src/display') diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs index d89b1076..cb5e2a42 100644 --- a/alacritty/src/display/mod.rs +++ b/alacritty/src/display/mod.rs @@ -537,7 +537,7 @@ impl Display { lines.update(&cell); // Draw the cell. - api.render_cell(cell, glyph_cache); + api.draw_cell(cell, glyph_cache); } }); } @@ -606,7 +606,7 @@ impl Display { for (i, message_text) in text.iter().enumerate() { let point = Point::new(start_line + i, Column(0)); self.renderer.with_api(config, &size_info, |mut api| { - api.render_string(glyph_cache, point, fg, bg, message_text); + api.draw_string(glyph_cache, point, fg, bg, message_text); }); } } else { @@ -756,7 +756,7 @@ impl Display { let bg = config.colors.search_bar_background(); self.renderer.with_api(config, size_info, |mut api| { - api.render_string(glyph_cache, point, fg, bg, &text); + api.draw_string(glyph_cache, point, fg, bg, &text); }); } @@ -774,7 +774,7 @@ impl Display { let bg = config.colors.normal.red; self.renderer.with_api(config, size_info, |mut api| { - api.render_string(glyph_cache, point, fg, bg, &timing); + api.draw_string(glyph_cache, point, fg, bg, &timing); }); } @@ -797,7 +797,7 @@ impl Display { if obstructed_column.map_or(true, |obstructed_column| obstructed_column < column) { let glyph_cache = &mut self.glyph_cache; self.renderer.with_api(config, size_info, |mut api| { - api.render_string(glyph_cache, Point::new(0, column), fg, bg, &text); + api.draw_string(glyph_cache, Point::new(0, column), fg, bg, &text); }); } } -- cgit