Enum comfy_wgpu::epaint::text::FontFamily
pub enum FontFamily {
Proportional,
Monospace,
Name(Arc<str, Global>),
}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, Global>)
One of the names in FontDefinitions::families.
// User-chosen names:
FontFamily::Name("arial".into());
FontFamily::Name("serif".into());Trait Implementations§
§impl Clone for FontFamily
impl Clone for FontFamily
§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 more§impl Debug for FontFamily
impl Debug for FontFamily
§impl Default for FontFamily
impl Default for FontFamily
§fn default() -> FontFamily
fn default() -> FontFamily
Returns the “default value” for a type. Read more
§impl Display for FontFamily
impl Display for FontFamily
§impl Hash for FontFamily
impl Hash for FontFamily
§impl Ord for FontFamily
impl Ord for FontFamily
§impl PartialEq<FontFamily> for FontFamily
impl PartialEq<FontFamily> for FontFamily
§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 ==.§impl PartialOrd<FontFamily> for FontFamily
impl PartialOrd<FontFamily> for FontFamily
§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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.