summaryrefslogtreecommitdiffstats
path: root/src/renderer/mod.rs
diff options
context:
space:
mode:
authorDan Aloni <alonid@gmail.com>2017-10-14 20:35:56 +0300
committerJoe Wilm <jwilm@users.noreply.github.com>2017-10-14 10:35:56 -0700
commit8a0b1d9c3f5a9ddb98469a340bbcd06374d4a24e (patch)
tree80768003f9a2f3c99b0238dc68f4c9b119cc77d6 /src/renderer/mod.rs
parentfd410f9ec8bc53e35d46cc213244c978ef7c5816 (diff)
Implement user actions for font resize (#625)
Adds support for font resizing at run-time. Three new actions are introduced: * IncreaseFontSize - Increases current font size by 1.0 * DecreaseFontSize - Decreases current font size by 1.0 * ResetFontSize - Resets font size to that specified in the configuration. The stock config files have example configuration for each which should match gnome-terminal. For convenience, the config entries are: - { key: Key0, mods: Control, action: ResetFontSize } - { key: Equals, mods: Control, action: IncreaseFontSize } - { key: Subtract, mods: Control, action: DecreaseFontSize }
Diffstat (limited to 'src/renderer/mod.rs')
-rw-r--r--src/renderer/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs
index 9ce690ca..9e6036d4 100644
--- a/src/renderer/mod.rs
+++ b/src/renderer/mod.rs
@@ -29,7 +29,7 @@ use gl;
use index::{Line, Column, RangeInclusive};
use notify::{Watcher, watcher, RecursiveMode, DebouncedEvent};
-use config::{self, Config, Delta};
+use config::{self, Config, Font, Delta};
use term::{self, cell, RenderableCell};
use window::{Size, Pixels};
@@ -170,12 +170,11 @@ pub struct GlyphCache {
impl GlyphCache {
pub fn new<L>(
mut rasterizer: Rasterizer,
- config: &Config,
+ font: &Font,
loader: &mut L
) -> Result<GlyphCache, font::Error>
where L: LoadGlyph
{
- let font = config.font();
let size = font.size();
let glyph_offset = *font.glyph_offset();