summaryrefslogtreecommitdiffstats
path: root/font
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-19 18:00:24 +0000
committerGitHub <noreply@github.com>2019-04-19 18:00:24 +0000
commitcfc20d4f34dca535654cc32df18e785296af4cc5 (patch)
treeb9697a365d1ec4b3161fd67937497e90a63f5c0d /font
parenta47d716daace7c197392854754406a06454ec380 (diff)
Fix cursor dimensions with font offset
Previously cursor dimensions were not calculated correctly when a font offset was specified, since the font offset was completely ignored. This has been fixed by moving all the cursor logic from the font into the Alacritty crate, applying the config's offsets before rasterizing the cursors. This has also fixed an issue with some cursors not being rendered as double-width correctly when over double-width glyphs. This fixes #2209.
Diffstat (limited to 'font')
-rw-r--r--font/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/font/src/lib.rs b/font/src/lib.rs
index f23d0a0f..38a6f82f 100644
--- a/font/src/lib.rs
+++ b/font/src/lib.rs
@@ -213,6 +213,7 @@ impl ::std::ops::Add for Size {
}
}
+#[derive(Clone)]
pub struct RasterizedGlyph {
pub c: char,
pub width: i32,
@@ -314,6 +315,7 @@ impl fmt::Debug for RasterizedGlyph {
}
}
+#[derive(Copy, Clone)]
pub struct Metrics {
pub average_advance: f64,
pub line_height: f64,