Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved font handling #6

Merged
merged 6 commits into from
Jul 26, 2024
Merged

Improved font handling #6

merged 6 commits into from
Jul 26, 2024

Conversation

TimJentzsch
Copy link
Owner

Objective

Closes #5.

Font handling in Bevy is quite annoying in general, as you have to deal with individual font faces instead of font families and a given style.

For BBCode this is particularly annoying, as for each combination of bold, italic, regular you have to load a font separately and configure it.

Solution

This PR adds a new FontPlugin which is automatically included by BbcodePlugin.

You now provide an asset path to a font folder when constructing the plugin.
The fonts in that folder are then loaded automatically and used to obtain the individual font handles.

Then in BbcodeSettings you only need to specify the font family you want to use and it all happens automatically!

@TimJentzsch TimJentzsch added enhancement New feature or request breaking-change labels Jul 26, 2024
@TimJentzsch TimJentzsch merged commit 9fb125e into main Jul 26, 2024
4 checks passed
@TimJentzsch TimJentzsch deleted the 5-improved-font-handling branch July 26, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved font handling
1 participant