[−][src]Struct kas::text::fonts::FontSelector
A font face selection tool
This tool selects a font according to the given criteria from available system fonts. Selection criteria are based on CSS.
Implementations
impl FontSelector
[src]
pub fn new() -> FontSelector
[src]
Synonym for default
Without further parametrisation, this will select a generic sans-serif font which should be suitable for most uses.
pub fn assign(&mut self, rhs: &FontSelector)
[src]
Set self to rhs
This may save a reallocation over direct assignment.
pub fn set_families(&mut self, names: Vec<FamilyName, Global>)
[src]
Set family name(s)
If multiple names are passed, the first to successfully resolve a font is used. Glyph-level fallback (missing glyph substitution) is not currently supported.
pub fn set_style(&mut self, style: Style)
[src]
Set style
pub fn set_weight(&mut self, weight: Weight)
[src]
Set weight
pub fn set_stretch(&mut self, stretch: Stretch)
[src]
Set stretch
pub fn hash(&self) -> u64
[src]
Hash self
This struct does not implement Hash
since it doesn't precisely match
the expected semantics: values may compare equal despite having
different hashes. For our purposes this is acceptable.
Trait Implementations
impl Clone for FontSelector
[src]
pub fn clone(&self) -> FontSelector
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FontSelector
[src]
impl Default for FontSelector
[src]
pub fn default() -> FontSelector
[src]
impl PartialEq<FontSelector> for FontSelector
[src]
pub fn eq(&self, other: &FontSelector) -> bool
[src]
pub fn ne(&self, other: &FontSelector) -> bool
[src]
impl StructuralPartialEq for FontSelector
[src]
Auto Trait Implementations
impl RefUnwindSafe for FontSelector
impl Send for FontSelector
impl Sync for FontSelector
impl Unpin for FontSelector
impl UnwindSafe for FontSelector
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,