#[repr(C)]pub struct NamedFont {
pub name: AzString,
pub bytes: U8Vec,
}Expand description
A named font bundled with the application (name + raw bytes).
The name is used to reference the font in CSS (e.g. font-family: "MyFont").
Fields§
§name: AzStringThe font family name to use in CSS (e.g. “Roboto”, “MyCustomFont”)
bytes: U8VecRaw font file bytes (TTF, OTF, etc.)
Implementations§
Trait Implementations§
Source§impl Extend<NamedFont> for NamedFontVec
impl Extend<NamedFont> for NamedFontVec
Source§fn extend<T: IntoIterator<Item = NamedFont>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = NamedFont>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<NamedFont> for NamedFontVec
impl FromIterator<NamedFont> for NamedFontVec
Source§impl Ord for NamedFont
impl Ord for NamedFont
Source§impl PartialOrd for NamedFont
impl PartialOrd for NamedFont
impl Eq for NamedFont
impl StructuralPartialEq for NamedFont
Auto Trait Implementations§
impl Freeze for NamedFont
impl RefUnwindSafe for NamedFont
impl Send for NamedFont
impl Sync for NamedFont
impl Unpin for NamedFont
impl UnsafeUnpin for NamedFont
impl UnwindSafe for NamedFont
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more