Struct font_kit::properties::Properties[][src]

pub struct Properties {
    pub style: Style,
    pub weight: Weight,
    pub stretch: Stretch,
}
Expand description

Properties that specify which font in a family to use: e.g. style, weight, and stretchiness.

This object supports a method chaining style for idiomatic initialization; e.g.

println!("{:?}", Properties::new().style(Style::Italic));

Fields

style: Style

The font style, as defined in CSS.

weight: Weight

The font weight, as defined in CSS.

stretch: Stretch

The font stretchiness, as defined in CSS.

Implementations

Initializes a property set to its default values: normal style, normal weight, and normal stretchiness.

Sets the value of the style property and returns this property set for method chaining.

Sets the value of the weight property and returns this property set for method chaining.

Sets the value of the stretch property and returns this property set for method chaining.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.