pub enum GenericFontFamily {
Serif,
SansSerif,
Monospace,
}Expand description
Polyhorn provides a few generic font families that can be used to get a system-provided typeface in a particular category that looks best on a user’s display. The default generic font family is SansSerif.
Variants§
Serif
This generic font style has serifs attached to the glyphs. Serifs are those pointy spikes at the extremes of (mostly) uppercase letters. This style is commonly used for newspaper headings.
SansSerif
This generic font style has no serifs. This type of font is commonly used for the main text.
Monospace
This generic font style has glyphs of equal width. This type of font is commonly used in code editors where each letter and symbol should have equal width.
Trait Implementations§
Source§impl Clone for GenericFontFamily
impl Clone for GenericFontFamily
Source§fn clone(&self) -> GenericFontFamily
fn clone(&self) -> GenericFontFamily
Returns a duplicate 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 GenericFontFamily
impl Debug for GenericFontFamily
Source§impl Default for GenericFontFamily
impl Default for GenericFontFamily
Source§fn default() -> GenericFontFamily
fn default() -> GenericFontFamily
Returns the “default value” for a type. Read more
Source§impl FromStr for GenericFontFamily
impl FromStr for GenericFontFamily
Source§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
Source§fn from_str(
s: &str,
) -> Result<GenericFontFamily, <GenericFontFamily as FromStr>::Err>
fn from_str( s: &str, ) -> Result<GenericFontFamily, <GenericFontFamily as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl PartialEq for GenericFontFamily
impl PartialEq for GenericFontFamily
Source§impl ToTokens for GenericFontFamily
impl ToTokens for GenericFontFamily
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 GenericFontFamily
impl Eq for GenericFontFamily
impl StructuralPartialEq for GenericFontFamily
Auto Trait Implementations§
impl Freeze for GenericFontFamily
impl RefUnwindSafe for GenericFontFamily
impl Send for GenericFontFamily
impl Sync for GenericFontFamily
impl Unpin for GenericFontFamily
impl UnwindSafe for GenericFontFamily
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>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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§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
Convert into T with values clamped to the color defined bounds Read more
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds error is returned which contains the unclamped color. Read moreSource§impl<T> IsDefault for T
impl<T> IsDefault for T
Source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.