diff --git a/Cargo.lock b/Cargo.lock index 4b54c851..427d1614 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1912,6 +1912,11 @@ dependencies = [ "windows", ] +[[package]] +name = "nih_plug_assets" +version = "0.1.0" +source = "git+https://github.com/robbert-vdh/nih_plug_assets.git#e921bf583ce13f518f3b9e9ce533cd55246d7fce" + [[package]] name = "nih_plug_derive" version = "0.1.0" @@ -1941,6 +1946,7 @@ dependencies = [ "crossbeam", "iced_baseview", "nih_plug", + "nih_plug_assets", ] [[package]] diff --git a/nih_plug_iced/Cargo.toml b/nih_plug_iced/Cargo.toml index bd2cb31a..ff5d8897 100644 --- a/nih_plug_iced/Cargo.toml +++ b/nih_plug_iced/Cargo.toml @@ -54,6 +54,7 @@ smol = ["iced_baseview/smol"] [dependencies] nih_plug = { path = ".." } +nih_plug_assets = { git = "https://github.com/robbert-vdh/nih_plug_assets.git" } baseview = { git = "https://github.com/robbert-vdh/baseview.git", branch = "feature/mouse-event-modifiers" } crossbeam = "0.8" diff --git a/nih_plug_iced/src/lib.rs b/nih_plug_iced/src/lib.rs index 25c02217..61a5b64e 100644 --- a/nih_plug_iced/src/lib.rs +++ b/nih_plug_iced/src/lib.rs @@ -14,6 +14,7 @@ use crate::widgets::ParamMessage; /// Re-export for convenience. pub use iced_baseview::*; +pub use nih_plug_assets as assets; pub mod widgets; mod wrapper; @@ -111,6 +112,10 @@ pub trait IcedEditor: 'static + Send + Sync + Sized { // Enable some anti-aliasing by default. Since GUIs are likely very simple and most of // the work will be on the CPU anyways this should not affect performance much. antialiasing: Some(iced_baseview::backend::settings::Antialiasing::MSAAx4), + // Use Noto Sans as the default font as that renders a bit more cleanly than the default + // Lato font. This crate also contains other weights and versions of this font you can + // use for individual widgets. + default_font: Some(crate::assets::fonts::NOTO_SANS_REGULAR), ..iced_baseview::backend::settings::Settings::default() } }