pub struct FontFamily<T: Clone + Debug> {
pub regular: T,
pub bold: T,
pub italic: T,
pub bold_italic: T,
}Expand description
A collection of fonts with different styles.
See the module documentation for details on the internals.
Fields§
§regular: TThe regular variant of this font family.
bold: TThe bold variant of this font family.
italic: TThe italic variant of this font family.
bold_italic: TThe bold italic variant of this font family.
Implementations§
Trait Implementations§
Source§impl<T: Clone + Clone + Debug> Clone for FontFamily<T>
impl<T: Clone + Clone + Debug> Clone for FontFamily<T>
Source§fn clone(&self) -> FontFamily<T>
fn clone(&self) -> FontFamily<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy + Clone + Debug> Copy for FontFamily<T>
impl<T: Clone + Debug> StructuralPartialEq for FontFamily<T>
Auto Trait Implementations§
impl<T> Freeze for FontFamily<T>where
T: Freeze,
impl<T> RefUnwindSafe for FontFamily<T>where
T: RefUnwindSafe,
impl<T> Send for FontFamily<T>where
T: Send,
impl<T> Sync for FontFamily<T>where
T: Sync,
impl<T> Unpin for FontFamily<T>where
T: Unpin,
impl<T> UnwindSafe for FontFamily<T>where
T: UnwindSafe,
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.