Implement font::load command in iced_native
This commit is contained in:
parent
b29de28d1f
commit
238154af4a
14 changed files with 384 additions and 241 deletions
|
|
@ -10,6 +10,7 @@ use iced_native::{Background, Color, Element, Font, Point, Rectangle, Size};
|
|||
|
||||
pub use iced_native::renderer::Style;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
/// A backend-agnostic renderer that supports all the built-in widgets.
|
||||
|
|
@ -167,6 +168,10 @@ where
|
|||
)
|
||||
}
|
||||
|
||||
fn load_font(&mut self, bytes: Cow<'static, [u8]>) {
|
||||
self.backend.load_font(bytes);
|
||||
}
|
||||
|
||||
fn fill_text(&mut self, text: Text<'_, Self::Font>) {
|
||||
self.primitives.push(Primitive::Text {
|
||||
content: text.content.to_string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue