Enum egui::text::FontFamily
source · 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 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§fn eq(&self, other: &FontFamily) -> bool
fn eq(&self, other: &FontFamily) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for FontFamily
impl PartialOrd for FontFamily
source§fn partial_cmp(&self, other: &FontFamily) -> Option<Ordering>
fn partial_cmp(&self, other: &FontFamily) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for FontFamily
impl StructuralEq for FontFamily
impl StructuralPartialEq for FontFamily
Auto Trait Implementations§
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