summaryrefslogtreecommitdiffstats
path: root/font
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-01-05 03:22:58 +0000
committerGitHub <noreply@github.com>2018-01-05 03:22:58 +0000
commit228400a6c24bf651ecd74996d1fa68c3d92c9ff9 (patch)
tree5f7022854988b37592c8c47ef0215e62ce69c5b8 /font
parent7b4ba80bb195b862f50c16263405a9507f99bb82 (diff)
Prevent font_size_modifier from sinking too low (#994)
This replaces the `font_size_modifier` stored on the `Term` struct with a `font_size` field. With this change it is not necessary anymore to calculate the new font size from a delta but the current font size is always stored directly on the `Term` struct. As a result of this it is now possible to increase the font size by more than 127 steps at runtime. It also limits the minimum font size to 1, so issues with the `font_size_modifier` dropping far below font size 1 are resolved with this change. This fixes #955.
Diffstat (limited to 'font')
-rw-r--r--font/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/font/src/lib.rs b/font/src/lib.rs
index ad1f4f80..330ed362 100644
--- a/font/src/lib.rs
+++ b/font/src/lib.rs
@@ -166,7 +166,7 @@ impl Hash for GlyphKey {
}
/// Font size stored as integer
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct Size(i16);
impl Size {