From 5c51d528ea8ded63b127a4f17ee6136653db09b9 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sun, 8 May 2022 11:24:51 +0300 Subject: Fix gap in builtin box drawing Builtin box drawing glyphs in range from '\u{2580}' to `\u{2587}` could have gap due to missing rounding. Previously height was rounded, however not the `y` offset. This commit fixes it. --- CHANGELOG.md | 1 + alacritty/src/renderer/text/builtin_font.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4439f9ac..df947f10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - The colors being slightly different when using srgb displays on macOS - Vi cursor blinking not reset when navigating in search - Scrolling and middle-clicking modifying the primary selection +- Bottom gap for certain builtin box drawing characters ## 0.10.1 diff --git a/alacritty/src/renderer/text/builtin_font.rs b/alacritty/src/renderer/text/builtin_font.rs index 0922d3ef..035dfd2d 100644 --- a/alacritty/src/renderer/text/builtin_font.rs +++ b/alacritty/src/renderer/text/builtin_font.rs @@ -412,7 +412,7 @@ fn box_drawing(character: char, metrics: &Metrics, offset: &Delta) -> Raster }; // Fix `y` coordinates. - y = height - y; + y = (height - y).round(); // Ensure that resulted glyph will be visible and also round sizes instead of straight // flooring them. -- cgit