Enum cosmic_text::Family
source · pub enum Family<'a> {
Name(&'a str),
Serif,
SansSerif,
Cursive,
Fantasy,
Monospace,
}
Expand description
A font family.
Variants§
Name(&'a str)
The name of a font family of choice.
This must be a Typographic Family (ID 16) or a Family Name (ID 1) in terms of TrueType. Meaning you have to pass a family without any additional suffixes like Bold, Italic, Regular, etc.
Localized names are allowed.
Serif
Serif fonts represent the formal text style for a script.
SansSerif
Glyphs in sans-serif fonts, as the term is used in CSS, are generally low contrast and have stroke endings that are plain — without any flaring, cross stroke, or other ornamentation.
Cursive
Glyphs in cursive fonts generally use a more informal script style, and the result looks more like handwritten pen or brush writing than printed letterwork.
Fantasy
Fantasy fonts are primarily decorative or expressive fonts that contain decorative or expressive representations of characters.
Monospace
The sole criterion of a monospace font is that all glyphs have the same fixed width.
Trait Implementations§
impl<'a> Copy for Family<'a>
impl<'a> Eq for Family<'a>
impl<'a> StructuralPartialEq for Family<'a>
Auto Trait Implementations§
impl<'a> Freeze for Family<'a>
impl<'a> RefUnwindSafe for Family<'a>
impl<'a> Send for Family<'a>
impl<'a> Sync for Family<'a>
impl<'a> Unpin for Family<'a>
impl<'a> UnwindSafe for Family<'a>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more