Fixed Rusttype Font ownership issues
This commit is contained in:
@@ -26,7 +26,7 @@ mod vesseldata;
|
||||
use vesseldata::VesselDataEventSource;
|
||||
|
||||
pub struct HelmsDisplay {
|
||||
font: Box<Font<'static>>,
|
||||
font: Font<'static>,
|
||||
boat: forms::Form,
|
||||
compassrose: forms::Form,
|
||||
cog: forms::Form,
|
||||
@@ -46,8 +46,7 @@ impl HelmsDisplay {
|
||||
let compassrose = loader.load_form("compass-rose.svg").unwrap();
|
||||
let cog = loader.load_form("cog.svg").unwrap();
|
||||
let wind = loader.load_form("wind.svg").unwrap();
|
||||
let f = loader.load_font("font.ttf").unwrap();
|
||||
let font = Box::new(f);
|
||||
let font = loader.load_font("font.ttf").unwrap();
|
||||
|
||||
HelmsDisplay {
|
||||
font: font,
|
||||
|
||||
Reference in New Issue
Block a user