Rename iced_native to iced_runtime

This commit is contained in:
Héctor Ramón Jiménez 2023-03-05 06:35:20 +01:00
parent 8af69be47e
commit 99e0a71504
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
39 changed files with 87 additions and 97 deletions

19
runtime/src/font.rs Normal file
View file

@ -0,0 +1,19 @@
//! Load and use fonts.
pub use iced_core::font::*;
use crate::command::{self, Command};
use std::borrow::Cow;
/// An error while loading a font.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Error {}
/// Load a font from its bytes.
pub fn load(
bytes: impl Into<Cow<'static, [u8]>>,
) -> Command<Result<(), Error>> {
Command::single(command::Action::LoadFont {
bytes: bytes.into(),
tagger: Box::new(std::convert::identity),
})
}