pub enum TextClass {
Standard,
Label,
Small,
Editor,
Serif,
SansSerif,
Monospace,
}Expand description
Font “class” selector
Fonts are chosen from available (system) fonts depending on the TextClass
and configuration.
TextClass may affect other font properties, including size and weight.
Some classes by default appear identical to TextClass::Standard but may
be configured otherwise by the user.
Variants§
Standard
The standard UI font
By default this matches the system UI font.
Label
Label UI font
This text class should be used by short labels such as those found on buttons, menus and other UI controls.
Its appearance is normally identical to TextClass::Standard.
Small
Small UI font
This class is usually similar to TextClass::Standard but smaller.
Editor
Editable text
This text class should be preferred for editable text.
Its appearance is normally identical to TextClass::Standard.
Serif
Serif font
This class may be used where a Serif font is specifically preferred, for example in an editor where it is important to be able to distinguish all letters.
SansSerif
Sans-serif Font
Its appearance is normally identical to TextClass::Standard.
Monospace
Monospace font
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextClass
impl<'de> Deserialize<'de> for TextClass
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>,
Source§impl Linearize for TextClass
impl Linearize for TextClass
Source§unsafe fn from_linear_unchecked(linear: usize) -> Self
unsafe fn from_linear_unchecked(linear: usize) -> Self
linearize function. Read moreSource§impl Ord for TextClass
impl Ord for TextClass
Source§impl PartialOrd for TextClass
impl PartialOrd for TextClass
impl Copy for TextClass
impl Eq for TextClass
impl StructuralPartialEq for TextClass
Auto Trait Implementations§
impl Freeze for TextClass
impl RefUnwindSafe for TextClass
impl Send for TextClass
impl Sync for TextClass
impl Unpin for TextClass
impl UnwindSafe for TextClass
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
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.