-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add font size warning to TextSection #9660
base: main
Are you sure you want to change the base?
Conversation
Similarly, |
Good work :) We could make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the function not attempt to create a TextSection if the font size is invalid?
That
Because the problem is repairable and cosmetic, I think that warning is the least bad option, although I'm open to being convinced. |
Silent fail won't give us information and Result always get's unwrapped, which doesn't add value. |
When I posted the issue my thinking was that the warning would be added somewhere to the text systems rather than to Warning on creation of |
While we're at it, would it also make sense to check if the number |
Co-authored-by: ravenclaw900 <[email protected]>
Objective
TextSection
s are unable to display their text value if thefont_size
is less than or equal to 0, thus @ickshonpe suggested we emit a warning to the console whenever this occurs.font_size
warning #9655Solution
bevy_log
as a dependency tobevy_text
to be able to access thewarn!
macro.