aboutsummaryrefslogtreecommitdiff
path: root/src/render.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-10-07 22:25:14 +0200
committerDaniel Schadt <kingdread@gmx.de>2021-10-07 22:25:14 +0200
commit048e05b9d46bb33b45f8a31b9ec079aae7dd1cf1 (patch)
treee8a3ba940dcca6f0eb45109b7e5d08ea700310ed /src/render.rs
parent4327d932613b329e6e3b33d78f55662127bd4203 (diff)
downloadkondou-048e05b9d46bb33b45f8a31b9ec079aae7dd1cf1.tar.gz
kondou-048e05b9d46bb33b45f8a31b9ec079aae7dd1cf1.tar.bz2
kondou-048e05b9d46bb33b45f8a31b9ec079aae7dd1cf1.zip
Update dependencies
Some slight API changes in rusttype, but apart from that it's only version number bumps.
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render.rs b/src/render.rs
index cb6a4fb..fa8e1df 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -6,7 +6,7 @@ use image::{
};
use imageproc::{drawing, rect::Rect};
use num_traits::{Num, NumCast};
-use rusttype::{Font, Scale, SharedBytes};
+use rusttype::{Font, Scale};
use serde::{Deserialize, Serialize};
use std::{error::Error, fmt};
@@ -86,7 +86,7 @@ impl Default for RenderOptions {
trait_size: 30,
line_color: Rgba([0, 0, 0, 255]),
line_height: 4,
- font: Font::from_bytes(SharedBytes::ByRef(include_bytes!("LiberationMono.ttf")))
+ font: Font::try_from_bytes(include_bytes!("LiberationMono.ttf"))
.expect("Invalid font data for default font"),
text_color: Rgba([0, 0, 0, 255]),
text_size: 20,