pub struct FontTweak {
pub scale: f32,
pub y_offset_factor: f32,
pub y_offset: f32,
}
Expand description
Extra scale and vertical tweak to apply to all text of a certain font.
Fields§
§scale: f32
Scale the font by this much.
Default: 1.0
(no scaling).
y_offset_factor: f32
Shift font downwards by this fraction of the font size (in points).
A positive value shifts the text downwards. A negative value shifts it upwards.
Example value: -0.2
.
y_offset: f32
Shift font downwards by this amount of logical points.
Example value: 2.0
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for FontTweak
impl<'de> Deserialize<'de> for FontTweak
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more