diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/application.rs | 7 | ||||
| -rw-r--r-- | src/settings.rs | 4 | 
2 files changed, 10 insertions, 1 deletions
| diff --git a/src/application.rs b/src/application.rs index a7e826fb..7dd76774 100644 --- a/src/application.rs +++ b/src/application.rs @@ -151,7 +151,12 @@ pub trait Application: Sized {          Self: 'static,      {          #[cfg(not(target_arch = "wasm32"))] -        <Instance<Self> as iced_winit::Application>::run(_settings.into()); +        <Instance<Self> as iced_winit::Application>::run( +            _settings.into(), +            iced_wgpu::Settings { +                default_font: _settings.default_font, +            }, +        );          #[cfg(target_arch = "wasm32")]          <Instance<Self> as iced_web::Application>::run(); diff --git a/src/settings.rs b/src/settings.rs index 4ae18a14..b01e6fc8 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -15,6 +15,9 @@ pub struct Settings {      ///      /// [`Color`]: ../struct.Color.html      pub background: Color, + +    // TODO: Add `name` for web compatibility +    pub default_font: Option<&'static [u8]>,  }  impl Default for Settings { @@ -22,6 +25,7 @@ impl Default for Settings {          Settings {              window: Window::default(),              background: Color::WHITE, +            default_font: None,          }      }  } | 
