Type Alias skrifa::setting::VariationSetting

source ·
pub type VariationSetting = Setting<f32>;
Expand description

Type for specifying a variation axis setting in user coordinates.

The selector field should contain a tag that corresponds to a variation axis while the value field specifies the desired position on the axis in user coordinates (i.e. within the range defined by the minimum and maximum values of the axis).

§Example

use skrifa::{Tag, setting::VariationSetting};

// For convenience, a conversion from (&str, f32) is provided.
let slightly_bolder: VariationSetting = ("wght", 720.0).into();

assert_eq!(slightly_bolder, VariationSetting::new(Tag::new(b"wght"), 720.0));

Aliased Type§

struct VariationSetting {
    pub selector: Tag,
    pub value: f32,
}

Fields§

§selector: Tag

Tag that specifies the target setting.

§value: f32

The desired value for the setting.