pub enum FontFamily {
Sans,
Serif,
Mono,
Custom(FontId),
}Expand description
Which face a text shapes with: one of the three stock families, or a font registered with the core.
Variants§
Sans
Serif
Mono
Custom(FontId)
A font registered with the core (Core::add_font_data from file
bytes, or Core::add_system_font by installed family name). A
stale handle shapes as sans-serif. Not on the wire as a family:
the font row carries the handle.
Implementations§
Source§impl FontFamily
impl FontFamily
Sourcepub const ALL: &'static [FontFamily]
pub const ALL: &'static [FontFamily]
The three stock families, in wire order: a binding sends the index.
Custom is not a family on the wire; the font row is.
Sourcepub fn name(self) -> Option<&'static str>
pub fn name(self) -> Option<&'static str>
The spelling every binding uses; a registered font has none.
Sourcepub fn from_index(i: usize) -> FontFamily
pub fn from_index(i: usize) -> FontFamily
The variant schema::FAMILIES index i names; Sans for an
index this build lacks.
Trait Implementations§
Source§impl Clone for FontFamily
impl Clone for FontFamily
impl Copy for FontFamily
Source§impl Debug for FontFamily
impl Debug for FontFamily
Source§impl Default for FontFamily
impl Default for FontFamily
impl Eq for FontFamily
Source§impl PartialEq for FontFamily
impl PartialEq for FontFamily
impl StructuralPartialEq for FontFamily
Auto Trait Implementations§
impl Freeze for FontFamily
impl RefUnwindSafe for FontFamily
impl Send for FontFamily
impl Sync for FontFamily
impl Unpin for FontFamily
impl UnsafeUnpin for FontFamily
impl UnwindSafe for FontFamily
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.