pub struct FontEntry {
pub family: String,
pub src: String,
pub weight: u32,
pub italic: bool,
}Expand description
A custom font to register with the engine.
Fields§
§family: StringFont family name (e.g. “Inter”, “Roboto”).
src: StringBase64-encoded font data, or a data URI (e.g. “data:font/ttf;base64,…”).
weight: u32Font weight (100-900). Defaults to 400.
italic: boolWhether this is an italic variant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FontEntry
impl<'de> Deserialize<'de> for FontEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FontEntry
impl RefUnwindSafe for FontEntry
impl Send for FontEntry
impl Sync for FontEntry
impl Unpin for FontEntry
impl UnsafeUnpin for FontEntry
impl UnwindSafe for FontEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more