pub enum FontFamily {
Proportional,
Monospace,
Name(Arc<str>),
}
Expand description
Font of unknown size.
Which style of font: Monospace
, Proportional
,
or by user-chosen name.
Variants§
Proportional
A font where some characters are wider than other (e.g. ‘w’ is wider than ‘i’).
Proportional fonts are easier to read and should be the preferred choice in most situations.
Monospace
A font where each character is the same width (w
is the same width as i
).
Useful for code snippets, or when you need to align numbers or text.
Name(Arc<str>)
One of the names in FontDefinitions::families
.
// User-chosen names:
FontFamily::Name("arial".into());
FontFamily::Name("serif".into());
Trait Implementations§
Source§impl Clone for FontFamily
impl Clone for FontFamily
Source§fn clone(&self) -> FontFamily
fn clone(&self) -> FontFamily
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 moreSource§impl Debug for FontFamily
impl Debug for FontFamily
Source§impl Default for FontFamily
impl Default for FontFamily
Source§fn default() -> FontFamily
fn default() -> FontFamily
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FontFamily
impl<'de> Deserialize<'de> for FontFamily
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FontFamily
impl Display for FontFamily
Source§impl Hash for FontFamily
impl Hash for FontFamily
Source§impl Ord for FontFamily
impl Ord for FontFamily
Source§fn cmp(&self, other: &FontFamily) -> Ordering
fn cmp(&self, other: &FontFamily) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FontFamily
impl PartialEq for FontFamily
Source§impl PartialOrd for FontFamily
impl PartialOrd for FontFamily
Source§impl Serialize for FontFamily
impl Serialize for FontFamily
impl Eq 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 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