pub struct FontTweak {
pub scale: f32,
pub y_offset_factor: f32,
pub y_offset: f32,
pub hinting_override: Option<bool>,
pub coords: VariationCoords,
}Expand description
Extra scale and vertical tweak to apply to all text of a certain font.
Fields§
§scale: f32Scale the font’s glyphs by this much. this is only a visual effect and does not affect the text layout.
Default: 1.0 (no scaling).
y_offset_factor: f32Shift font’s glyphs downwards by this fraction of the font size (in points). this is only a visual effect and does not affect the text layout.
Affects larger font sizes more.
A positive value shifts the text downwards. A negative value shifts it upwards.
Example value: -0.2.
y_offset: f32Shift font’s glyphs downwards by this amount of logical points. this is only a visual effect and does not affect the text layout.
Affects all font sizes equally.
Example value: 2.0.
hinting_override: Option<bool>Override the global font hinting setting for this specific font.
None means use the global setting.
coords: VariationCoordsOverride the font’s default variation coordinates.