[−][src]Struct piet_common::FontFamily
A reference to a font family.
This may be either a CSS-style "generic family name", such as "serif" or "monospace", or it can be an explicit family name.
To use a generic family name, use the provided associated constants:
FontFamily::SERIF, FontFamily::SANS_SERIF, FontFamily::SYSTEM_UI,
and FontFamily::MONOSPACE.
To use a specific font family you should not construct this type directly;
instead you should verify that the desired family exists, via the
Text::font API.
Implementations
impl FontFamily[src]
pub const SANS_SERIF: FontFamily[src]
A san-serif font, such as Arial or Helvetica.
pub const SERIF: FontFamily[src]
A serif font, such as Times New Roman or Charter.
pub const SYSTEM_UI: FontFamily[src]
The platform's preferred UI font; San Francisco on macOS, and Segoe UI on recent Windows.
pub const MONOSPACE: FontFamily[src]
A monospace font.
pub fn new_unchecked(s: impl Into<Arc<str>>) -> FontFamily[src]
Create a new font family with a given name, without verifying that it exists.
This should generally not be used; instead you should create a FontFamily
by calling the Text::font_family method, which verifies that the
family name exists.
pub fn name(&self) -> &str[src]
pub fn is_generic(&self) -> bool[src]
Returns true if this is a generic font family.
Trait Implementations
impl Clone for FontFamily[src]
pub fn clone(&self) -> FontFamily[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for FontFamily[src]
impl Default for FontFamily[src]
pub fn default() -> FontFamily[src]
impl Eq for FontFamily[src]
impl From<FontFamily> for TextAttribute[src]
pub fn from(t: FontFamily) -> TextAttribute[src]
impl Hash for FontFamily[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<FontFamily> for FontFamily[src]
pub fn eq(&self, other: &FontFamily) -> bool[src]
pub fn ne(&self, other: &FontFamily) -> bool[src]
impl StructuralEq for FontFamily[src]
impl StructuralPartialEq for FontFamily[src]
Auto Trait Implementations
impl RefUnwindSafe for FontFamily[src]
impl Send for FontFamily[src]
impl Sync for FontFamily[src]
impl Unpin for FontFamily[src]
impl UnwindSafe for FontFamily[src]
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> RoundFrom<T> for T[src]
pub fn round_from(x: T) -> T[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>, [src]
U: RoundFrom<T>,
pub fn round_into(self) -> U[src]
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>,