From 0f18290050466b4007dfa47beead0a9ba0c7600c Mon Sep 17 00:00:00 2001 From: PolyMeilex Date: Tue, 5 Dec 2023 20:39:38 +0100 Subject: [PATCH] Remove unused code --- neothesia-core/src/render/text/mod.rs | 9 +++------ neothesia/src/output_manager/mod.rs | 7 ------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/neothesia-core/src/render/text/mod.rs b/neothesia-core/src/render/text/mod.rs index eedc8f86..9ed6f291 100644 --- a/neothesia-core/src/render/text/mod.rs +++ b/neothesia-core/src/render/text/mod.rs @@ -30,12 +30,9 @@ pub struct TextRenderer { impl TextRenderer { pub fn new(gpu: &Gpu) -> Self { - let font_system = glyphon::FontSystem::new_with_fonts( - [glyphon::fontdb::Source::Binary(Arc::new(include_bytes!( - "./Roboto-Regular.ttf" - )))] - .into_iter(), - ); + let font_system = glyphon::FontSystem::new_with_fonts([glyphon::fontdb::Source::Binary( + Arc::new(include_bytes!("./Roboto-Regular.ttf")), + )]); let cache = glyphon::SwashCache::new(); let mut atlas = glyphon::TextAtlas::new(&gpu.device, &gpu.queue, gpu.texture_format); diff --git a/neothesia/src/output_manager/mod.rs b/neothesia/src/output_manager/mod.rs index aa8485f1..a993a4c5 100644 --- a/neothesia/src/output_manager/mod.rs +++ b/neothesia/src/output_manager/mod.rs @@ -50,9 +50,6 @@ pub struct OutputManager { midi_backend: Option, output_connection: (OutputDescriptor, Box), - - pub selected_output_id: Option, - pub selected_font_path: Option, } impl Default for OutputManager { @@ -86,8 +83,6 @@ impl OutputManager { midi_backend, output_connection: (OutputDescriptor::DummyOutput, Box::new(DummyOutput {})), - selected_output_id: None, - selected_font_path: None, } } @@ -116,12 +111,10 @@ impl OutputManager { if let Some(font) = font.clone() { self.output_connection = (desc, Box::new(synth.new_output_connection(&font))); - self.selected_font_path = Some(font); } else if let Some(path) = crate::utils::resources::default_sf2() { if path.exists() { self.output_connection = (desc, Box::new(synth.new_output_connection(&path))); - self.selected_font_path = Some(path); } } }