Implement font::load command in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2023-02-04 11:12:15 +01:00
parent b29de28d1f
commit 238154af4a
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
14 changed files with 384 additions and 241 deletions

View file

@ -14,6 +14,8 @@ use tracing::info_span;
#[cfg(any(feature = "image", feature = "svg"))]
use crate::image;
use std::borrow::Cow;
/// A [`wgpu`] graphics backend for [`iced`].
///
/// [`wgpu`]: https://github.com/gfx-rs/wgpu-rs
@ -234,6 +236,10 @@ impl backend::Text for Backend {
nearest_only,
)
}
fn load_font(&mut self, font: Cow<'static, [u8]>) {
self.text_pipeline.load_font(font);
}
}
#[cfg(feature = "image")]