pub struct FontAsset {
pub name: String,
pub family: String,
pub bytes: Vec<u8>,
}Expand description
A project font: the user-visible name, the logical family key text nodes reference, and the raw TTF/OTF bytes (saved/loaded inside the project).
Fields§
§name: StringDisplay name in the UI (e.g. “Inter-Regular.ttf”).
family: StringLogical family key that TextNode.font references.
bytes: Vec<u8>Raw TTF/OTF bytes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FontAsset
impl<'de> Deserialize<'de> for FontAsset
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
impl StructuralPartialEq for FontAsset
Auto Trait Implementations§
impl Freeze for FontAsset
impl RefUnwindSafe for FontAsset
impl Send for FontAsset
impl Sync for FontAsset
impl Unpin for FontAsset
impl UnsafeUnpin for FontAsset
impl UnwindSafe for FontAsset
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