Skip to content

fix: bundle and load own font#231

Merged
OpenSauce merged 2 commits intomainfrom
bundle-font
Mar 30, 2026
Merged

fix: bundle and load own font#231
OpenSauce merged 2 commits intomainfrom
bundle-font

Conversation

@OpenSauce
Copy link
Copy Markdown
Owner

fixes #229

There seems to be some issues with Iced and default fonts, depending on your system. So I'm just bundling in the font file and setting it.

Copilot AI review requested due to automatic review settings March 30, 2026 18:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix missing UI text on systems without the expected default fonts by bundling a font asset in rustortion-ui and configuring the standalone Iced app to load and use it by default.

Changes:

  • Add a rustortion_ui::font module exposing embedded font bytes and a corresponding iced::Font.
  • Configure the standalone GUI (iced::application) to load the embedded font and set it as the default font.
  • Adjust tuner dialog text rendering by removing explicit monospace font usage for the cents indicator.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
rustortion-ui/src/lib.rs Exposes the new font module from the UI crate.
rustortion-ui/src/font.rs Defines embedded font bytes and the default iced::Font name to use.
rustortion-standalone/src/gui/mod.rs Registers the embedded font with Iced and sets it as the default font for the standalone app.
rustortion-standalone/src/gui/components/dialogs/tuner.rs Removes explicit monospace font usage in the tuner’s cents indicator text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@OpenSauce OpenSauce enabled auto-merge (squash) March 30, 2026 18:42
@OpenSauce OpenSauce merged commit 55edaf9 into main Mar 30, 2026
7 checks passed
@OpenSauce OpenSauce deleted the bundle-font branch March 30, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Texts are missing when noto sans is not installed. A font fallback maybe better?

2 participants