Skip to content

Commit

Permalink
Change default FontTweak
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Sep 18, 2024
1 parent 9947d7c commit 5edaf40
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/epaint/src/text/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl Default for FontTweak {
scale: 1.0,
y_offset_factor: 0.0,
y_offset: 0.0,
baseline_offset_factor: -0.0333, // makes the default fonts look more centered in buttons and such
baseline_offset_factor: 0.0,
}
}
}
Expand Down Expand Up @@ -289,11 +289,8 @@ impl Default for FontDefinitions {
font_data.insert(
"emoji-icon-font".to_owned(),
FontData::from_static(EMOJI_ICON).tweak(FontTweak {
scale: 0.88, // make it smaller

// probably not correct, but this does make texts look better (#2724 for details)
y_offset_factor: 0.11, // move glyphs down to better align with common fonts
baseline_offset_factor: -0.11, // ...now the entire row is a bit down so shift it back
scale: 0.88, // Make it smaller
y_offset_factor: 0.04, // Move down slightly
..Default::default()
}),
);
Expand Down

0 comments on commit 5edaf40

Please sign in to comment.