1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Add UI to modify FontTweak live (#5125)

This will make it easier to get nice sizing and vertical alignments of
fonts
This commit is contained in:
Emil Ernerfeldt
2024-09-18 13:43:33 +02:00
committed by GitHub
parent e31b44f1a5
commit f4ed394a85
7 changed files with 126 additions and 25 deletions

View File

@@ -159,6 +159,8 @@ pub struct FontTweak {
/// Shift 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.
///
@@ -168,6 +170,8 @@ pub struct FontTweak {
/// Shift 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`.
pub y_offset: f32,