aboutsummaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-31 11:17:02 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-31 20:47:02 -0800
commit2738969f292c5202800f61d4f073d82aef436836 (patch)
tree55b4a75b2c39284e1fbd1b52f172d0752e820a6a /src/display.rs
parenta00970c9a83d0a9033e70650beb2f4a924cfe9cc (diff)
downloadalacritty-2738969f292c5202800f61d4f073d82aef436836.tar.gz
alacritty-2738969f292c5202800f61d4f073d82aef436836.zip
Propagate font rasterizer errors
This allows consumers of the font crate to handle errors instead of the library panicking.
Diffstat (limited to 'src/display.rs')
-rw-r--r--src/display.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/display.rs b/src/display.rs
index 8cf19f47..8e2134ab 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -22,7 +22,7 @@ use Rgb;
use ansi::Color;
use cli;
use config::Config;
-use font;
+use font::{self, Rasterize};
use meter::Meter;
use renderer::{GlyphCache, QuadRenderer};
use selection::Selection;
@@ -92,7 +92,8 @@ impl Display {
println!("device_pixel_ratio: {}", dpr);
- let rasterizer = font::Rasterizer::new(dpi.x(), dpi.y(), dpr);
+ // TODO ERROR HANDLING
+ let rasterizer = font::Rasterizer::new(dpi.x(), dpi.y(), dpr).unwrap();
// Create renderer
let mut renderer = QuadRenderer::new(config, size);