summaryrefslogtreecommitdiffstats
path: root/src/renderer/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-01-17 09:17:26 +0000
committerGitHub <noreply@github.com>2019-01-17 09:17:26 +0000
commit0d16478f5d997b6da5488885e15bfb09ca8e7f6d (patch)
tree9905e264149d5955ce1161ecf41ad2f23ec9ec91 /src/renderer/mod.rs
parent5864c30a54b250163c3a94f053f5f1b907adf9c9 (diff)
Make all configuration fields optional
All configuration fields now have fallback values which will be used if the field is not present. This includes mouse, key bindings and platform specific differences. The mouse and key bindings are now filled by default, if the user rebinds a default mapping, it will be overwritten. To unbind a default binding, it can be mapped to `chars: ""`. Since all platform differences can now be correctly handled by the `src/config/mod.rs` code, it's no longer necessary to maintain separate configuration files, so the `alacritty_macos.yml` and `alacritty_windows.yml` have been deleted. Fixes #40. Fixes #1923.
Diffstat (limited to 'src/renderer/mod.rs')
-rw-r--r--src/renderer/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs
index 4d5d8de3..f743e4b9 100644
--- a/src/renderer/mod.rs
+++ b/src/renderer/mod.rs
@@ -234,7 +234,7 @@ impl GlyphCache {
let size = font.size();
// Load regular font
- let regular_desc = Self::make_desc(&font.normal, font::Slant::Normal, font::Weight::Normal);
+ let regular_desc = Self::make_desc(&font.normal(), font::Slant::Normal, font::Weight::Normal);
let regular = rasterizer.load_font(&regular_desc, size)?;
@@ -250,12 +250,12 @@ impl GlyphCache {
};
// Load bold font
- let bold_desc = Self::make_desc(&font.bold, font::Slant::Normal, font::Weight::Bold);
+ let bold_desc = Self::make_desc(&font.bold(), font::Slant::Normal, font::Weight::Bold);
let bold = load_or_regular(bold_desc);
// Load italic font
- let italic_desc = Self::make_desc(&font.italic, font::Slant::Italic, font::Weight::Normal);
+ let italic_desc = Self::make_desc(&font.italic(), font::Slant::Italic, font::Weight::Normal);
let italic = load_or_regular(italic_desc);
@@ -272,7 +272,7 @@ impl GlyphCache {
} else {
font::Style::Description { slant, weight }
};
- FontDesc::new(&desc.family[..], style)
+ FontDesc::new(desc.family.clone(), style)
}
pub fn font_metrics(&self) -> font::Metrics {