aboutsummaryrefslogtreecommitdiff
path: root/src/term
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-05-03 15:12:23 -0700
committerJoe Wilm <jwilm@users.noreply.github.com>2017-05-06 12:53:54 -0700
commit149fbaef09a56613c72855bc60355c7848256500 (patch)
tree89bb581b2135c702e2f8c03772bf9ddd4470ac8f /src/term
parent6659810a22e62f8b41d7bc35ed07905ccebda68b (diff)
downloadalacritty-149fbaef09a56613c72855bc60355c7848256500.tar.gz
alacritty-149fbaef09a56613c72855bc60355c7848256500.zip
Fix glyph offsets in cell
We previously had a hard-coded value for aligning glyphs within cells. The font descent is now used, and the offset should be correct by default.
Diffstat (limited to 'src/term')
-rw-r--r--src/term/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 9981a3d1..4891e794 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -556,12 +556,12 @@ pub struct SizeInfo {
impl SizeInfo {
#[inline]
pub fn lines(&self) -> Line {
- Line((self.height / self.cell_height) as usize)
+ Line(((self.height - 4.0) / self.cell_height) as usize)
}
#[inline]
pub fn cols(&self) -> Column {
- Column((self.width / self.cell_width) as usize)
+ Column(((self.width - 4.0) / self.cell_width) as usize)
}
pub fn pixels_to_coords(&self, x: usize, y: usize) -> Option<Point> {