diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-05-08 11:24:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 11:24:51 +0300 |
commit | 5c51d528ea8ded63b127a4f17ee6136653db09b9 (patch) | |
tree | 70858ac41cef70f56a5cdca01d8fdba5eefe1804 | |
parent | ad3ebba53233fdc61584b341be970a1828d09013 (diff) | |
download | alacritty-5c51d528ea8ded63b127a4f17ee6136653db09b9.tar.gz alacritty-5c51d528ea8ded63b127a4f17ee6136653db09b9.zip |
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.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/renderer/text/builtin_font.rs | 2 |
2 files changed, 2 insertions, 1 deletions
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<i8>) -> 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. |