summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralgon <algon.0320@gmail.com>2022-05-20 19:08:25 +0900
committerGitHub <noreply@github.com>2022-05-20 13:08:25 +0300
commite319ca93a6574fbdeee3f764c4390917f558e3a7 (patch)
tree5fce83e1909ed5585e00e8fbbf766adf79b42de8
parent5c51d528ea8ded63b127a4f17ee6136653db09b9 (diff)
downloadalacritty-e319ca93a6574fbdeee3f764c4390917f558e3a7.tar.gz
alacritty-e319ca93a6574fbdeee3f764c4390917f558e3a7.zip
Fix builtin glyphs for U+2567 and U+2568
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/renderer/text/builtin_font.rs10
2 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df947f10..6cfd6688 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- 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
+- Incorrect buili-in glyphs for `U+2567` and `U+2568`
## 0.10.1
diff --git a/alacritty/src/renderer/text/builtin_font.rs b/alacritty/src/renderer/text/builtin_font.rs
index 035dfd2d..36d1ccdc 100644
--- a/alacritty/src/renderer/text/builtin_font.rs
+++ b/alacritty/src/renderer/text/builtin_font.rs
@@ -274,7 +274,7 @@ fn box_drawing(character: char, metrics: &Metrics, offset: &Delta<i8>) -> Raster
'\u{2561}'..='\u{2563}' | '\u{256a}' | '\u{256c}' => {
(v_left_bounds.1, v_left_bounds.1)
},
- '\u{2564}'..='\u{2566}' => (canvas.x_center(), v_left_bounds.1),
+ '\u{2564}'..='\u{2568}' => (canvas.x_center(), v_left_bounds.1),
'\u{2569}'..='\u{2569}' => (v_left_bounds.1, canvas.x_center()),
_ => (0., 0.),
};
@@ -297,13 +297,13 @@ fn box_drawing(character: char, metrics: &Metrics, offset: &Delta<i8>) -> Raster
// Top vertical part.
let (left_top_size, right_top_size) = match character {
'\u{2551}' | '\u{256a}' => (canvas.y_center(), canvas.y_center()),
- '\u{2558}'..='\u{255c}' | '\u{2567}' | '\u{2568}' => {
- (h_bot_bounds.1, h_top_bounds.1)
- },
+ '\u{2558}'..='\u{255c}' | '\u{2568}' => (h_bot_bounds.1, h_top_bounds.1),
'\u{255d}' => (h_top_bounds.1, h_bot_bounds.1),
'\u{255e}'..='\u{2560}' => (canvas.y_center(), h_top_bounds.1),
'\u{2561}'..='\u{2563}' => (h_top_bounds.1, canvas.y_center()),
- '\u{2569}' | '\u{256b}' | '\u{256c}' => (h_top_bounds.1, h_top_bounds.1),
+ '\u{2567}' | '\u{2569}' | '\u{256b}' | '\u{256c}' => {
+ (h_top_bounds.1, h_top_bounds.1)
+ },
_ => (0., 0.),
};