pub enum FontTemplate {
Raw(Arc<Vec<u8>>, u32),
Native(NativeFontHandle),
}
Expand description
Container for the raw data describing a font. This might be a stream of bytes corresponding to a downloaded font, or a handle to a native font from the operating system.
Note that fonts need to be instantiated before being used, which involves assigning size and various other options. The word ‘template’ here is intended to distinguish this data from instance-specific data.
Variants§
Trait Implementations§
Source§impl Clone for FontTemplate
impl Clone for FontTemplate
Source§fn clone(&self) -> FontTemplate
fn clone(&self) -> FontTemplate
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for FontTemplate
impl RefUnwindSafe for FontTemplate
impl Send for FontTemplate
impl Sync for FontTemplate
impl Unpin for FontTemplate
impl UnwindSafe for FontTemplate
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