diff options
author | 2023-02-04 11:12:15 +0100 | |
---|---|---|
committer | 2023-02-24 13:29:11 +0100 | |
commit | 238154af4ac8dda7f12dd90aa7be106e933bcb30 (patch) | |
tree | 4c8560b3464f0c900ddf31a3c063e925394923c6 /winit/src/application.rs | |
parent | b29de28d1f0f608f8029c93d154cfd1b0f8b8cbb (diff) | |
download | iced-238154af4ac8dda7f12dd90aa7be106e933bcb30.tar.gz iced-238154af4ac8dda7f12dd90aa7be106e933bcb30.tar.bz2 iced-238154af4ac8dda7f12dd90aa7be106e933bcb30.zip |
Implement `font::load` command in `iced_native`
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r-- | winit/src/application.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 9781a453..889becad 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -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"); + } } } } |