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§impl PartialOrd for FontFamily
impl PartialOrd 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)