pub enum FontWeight {
Number(f32),
Thin,
ExtraLight,
Light,
Normal,
Medium,
SemiBold,
Bold,
ExtraBold,
Black,
}Expand description
Controls the thickness of outlines rendered to a text element.
Variants§
Number(f32)
Accepts a custom normalized font weight scaled between 0 and 1.0
Thin
This corresponds to the CSS font weight with the same name and has a numerical value of 100.
ExtraLight
This corresponds to the CSS font weight with the same name and has a numerical value of 200. This weight is also known as ultra light.
Light
This corresponds to the CSS font weight with the same name and has a numerical value of 300.
Normal
This corresponds to the CSS font weight with the same name and has a numerical value of 400. This is the default font weight.
Medium
This corresponds to the CSS font weight with the same name and has a numerical value of 500.
SemiBold
This corresponds to the CSS font weight with the same name and has a numerical value of 600. This weight is also known as demi bold.
Bold
This corresponds to the CSS font weight with the same name and has a numerical value of 700.
ExtraBold
This corresponds to the CSS font weight with the same name and has a numerical value of 800. This weight is also known as ultra bold.
Black
This corresponds to the CSS font weight with the same name and has a numerical value of 900. This weight is also known as heavy.
Trait Implementations§
Source§impl Clone for FontWeight
impl Clone for FontWeight
Source§fn clone(&self) -> FontWeight
fn clone(&self) -> FontWeight
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FontWeight
impl Debug for FontWeight
Source§impl Default for FontWeight
impl Default for FontWeight
Source§fn default() -> FontWeight
fn default() -> FontWeight
Source§impl FromStr for FontWeight
impl FromStr for FontWeight
Source§type Err = ParseError
type Err = ParseError
Source§fn from_str(s: &str) -> Result<FontWeight, <FontWeight as FromStr>::Err>
fn from_str(s: &str) -> Result<FontWeight, <FontWeight as FromStr>::Err>
s to return a value of this type. Read moreSource§impl PartialEq for FontWeight
impl PartialEq for FontWeight
Source§impl ToTokens for FontWeight
impl ToTokens for FontWeight
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Copy for FontWeight
impl StructuralPartialEq for FontWeight
Auto Trait Implementations§
impl Freeze for FontWeight
impl RefUnwindSafe for FontWeight
impl Send for FontWeight
impl Sync for FontWeight
impl Unpin for FontWeight
impl UnwindSafe for FontWeight
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains the unclamped color. Read more