pub struct FontRef {
pub id: u64,
pub data: Arc<dyn AsRef<[u8]> + Send + Sync>,
pub index: u32,
}Expand description
Font bytes plus a stable identity used as a cache key by the glyph atlas.
Fields§
§id: u64Unique identity of these font bytes; equal ids must mean equal data.
data: Arc<dyn AsRef<[u8]> + Send + Sync>Raw font file bytes (TTF, OTF or a collection).
index: u32Index inside a font collection; 0 for single-font files.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FontRef
impl !UnwindSafe for FontRef
impl Freeze for FontRef
impl Send for FontRef
impl Sync for FontRef
impl Unpin for FontRef
impl UnsafeUnpin for FontRef
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