pub struct FontFace {
pub family: &'static str,
pub bytes: &'static [u8],
}Expand description
One font face a native host can register: a stable family name plus the raw face bytes.
family is for diagnostics and de-duplication only — it is never handed
to a platform font lookup (the whole point of carrying bytes is that the
platform has no way to look the family up), so it may be any stable,
human-meaningful name for the face.
bytes is one face’s complete font file (TTF/OTF). Equality is by
content (derived), which is rarely what a hot path wants — see the
module doc’s note on keying off payload identity instead.
Fields§
§family: &'static strA stable family name for this face — diagnostics/de-duplication only.
bytes: &'static [u8]The face’s complete font-file bytes (TTF/OTF).
Implementations§
Trait Implementations§
impl Copy for FontFace
impl Eq for FontFace
impl StructuralPartialEq for FontFace
Auto Trait Implementations§
impl Freeze for FontFace
impl RefUnwindSafe for FontFace
impl Send for FontFace
impl Sync for FontFace
impl Unpin for FontFace
impl UnsafeUnpin for FontFace
impl UnwindSafe for FontFace
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.