summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 9781a453..1bfce3a1 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -17,8 +17,8 @@ use crate::{
use iced_futures::futures;
use iced_futures::futures::channel::mpsc;
-use iced_graphics::compositor;
use iced_graphics::window;
+use iced_graphics::window::compositor;
use iced_native::program::Program;
use iced_native::time::Instant;
use iced_native::user_interface::{self, UserInterface};
@@ -851,6 +851,16 @@ pub fn run_command<A, E>(
current_cache = user_interface.into_cache();
*cache = current_cache;
}
+ command::Action::LoadFont { bytes, tagger } => {
+ use crate::text::Renderer;
+
+ // TODO: Error handling (?)
+ renderer.load_font(bytes);
+
+ proxy
+ .send_event(tagger(Ok(())))
+ .expect("Send message to event loop");
+ }
}
}
}