1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 07:10:04 -04:00

More even text kerning (#7431)

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
valadaptive
2025-09-08 11:29:41 -04:00
committed by GitHub
parent e5d0b93633
commit d5b0a6f446
162 changed files with 1203 additions and 1131 deletions

View File

@@ -213,7 +213,7 @@ fn label_ui(ui: &mut egui::Ui) {
ui.horizontal_wrapped(|ui| {
// Trick so we don't have to add spaces in the text below:
let width = ui.fonts(|f|f.glyph_width(&TextStyle::Body.resolve(ui.style()), ' '));
let width = ui.fonts_mut(|f|f.glyph_width(&TextStyle::Body.resolve(ui.style()), ' '));
ui.spacing_mut().item_spacing.x = width;
ui.label(RichText::new("Text can have").color(Color32::from_rgb(110, 255, 110)));
@@ -792,7 +792,7 @@ impl TextRotation {
let start_pos = self.size / 2.0;
let s = ui.ctx().fonts(|f| {
let s = ui.ctx().fonts_mut(|f| {
let mut t = egui::Shape::text(
f,
rect.min + start_pos,