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<FontTweak, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<FontTweak, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<FontTweak> for FontTweak
impl PartialEq<FontTweak> for FontTweak
source§impl Serialize for FontTweak
impl Serialize for FontTweak
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more