Skip to content

Allow customizing fallback font in AtomLayout#7382

Merged
lucasmerlin merged 2 commits intolucas/fix-rich-text-font-fallbackfrom
lucas/atom-layout-customize-fallback-font
Aug 7, 2025
Merged

Allow customizing fallback font in AtomLayout#7382
lucasmerlin merged 2 commits intolucas/fix-rich-text-font-fallbackfrom
lucas/atom-layout-customize-fallback-font

Conversation

@lucasmerlin
Copy link
Copy Markdown
Collaborator

@lucasmerlin lucasmerlin commented Jul 22, 2025

Before it was hard coded to TextStyle::Button, but it should be customizable.

@github-actions
Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/7382-lucasatom-layout-customize-fallback-font
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin lucasmerlin added feature New feature or request egui labels Jul 22, 2025
layout: AtomLayout::new(atoms.into_atoms()).sense(Sense::click()),
layout: AtomLayout::new(atoms.into_atoms())
.sense(Sense::click())
.fallback_font(TextStyle::Button),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be called "default_font" instead? I dunno

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also called fallback font in WidgetText so I think we should update it there as well for consistency. I'll open a PR for that

@lucasmerlin lucasmerlin merged commit d61d36d into lucas/fix-rich-text-font-fallback Aug 7, 2025
48 of 49 checks passed
@lucasmerlin lucasmerlin deleted the lucas/atom-layout-customize-fallback-font branch August 7, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants