Struct sixtyfps_corelib::graphics::FontRequest[][src]

pub struct FontRequest {
    pub family: Option<SharedString>,
    pub weight: Option<i32>,
    pub pixel_size: Option<f32>,
    pub letter_spacing: Option<f32>,
}

FontRequest collects all the developer-configurable properties for fonts, such as family, weight, etc. It is submitted as a request to the platform font system (i.e. CoreText on macOS) and in exchange the backend returns a Box.

Fields

family: Option<SharedString>

The name of the font family to be used, such as “Helvetica”. An empty family name means the system default font family should be used.

weight: Option<i32>

If the weight is None, the the system default font weight should be used.

pixel_size: Option<f32>

If the pixel size is None, the system default font size should be used.

letter_spacing: Option<f32>

The additional spacing (or shrinking if negative) between glyphs. This is usually not submitted to the font-subsystem but collected here for API convenience

Implementations

impl FontRequest[src]

pub fn merge(self, other: &FontRequest) -> Self[src]

Consumes the FontRequest, replaces any missing fields from the specified other request and returns the new request.

Trait Implementations

impl Clone for FontRequest[src]

impl Debug for FontRequest[src]

impl Default for FontRequest[src]

impl PartialEq<FontRequest> for FontRequest[src]

impl StructuralPartialEq for FontRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.