-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Can't set font size in themes for BMFont/Angelcode fonts (.fnt) #80497
Comments
I can confirm this on 4.2.dev 16a9356 (on godotengine/godot-demo-projects#849). |
Why is this an issue? Bitmap fonts can have only one size, and usually are pixel art fonts not intended for scaling. Besides this, a lot of bitmap fonts do not have size information, so there's no clear way to tell how exactly "size" property should affect them. Adding some sort of scaling with size will likely result in a lot of confusion and incorrectly scaled fonts. |
Fonts displayed with filtering enabled can be freely scaled up and down, although they will look blurry when upscaled and pixelated when downscaled (if mipmaps aren't enabled on the texture). That said, this is also an issue when using the For pixel art fonts, it's OK to scale them if using a size that is an integer multiple of the original size. We already document this caveat on the Using fonts page, so I think it would be fine to support scaling for pixel art fonts as well. Right now, you can rely on Control scaling but it breaks within containers and will also scale the underlying StyleBox (if any).
For monospace image fonts, can we infer a glyph size based on the size of each character on the image? I don't know how we could handle proportional bitmap fonts though, other than using something like the height of the "x" character. |
As Calinou outlines, I expected to be able to (up)scale pixel art fonts at least by even integers or powers of two or something. Even if results are not optimal, for prototyping that is still better than the theme size options plainly doing nothing. :) Alternatively, if we really do not want this to be possible, the UX should be improved - those settings should be disabled or a warning should appear or any other kind of feedback. |
It should be easy to enable scaling, but we should avoid the situation when user set custom font, but not font size, and it is auto-scaled (most people will likely expect it to use correct font size automatically). |
Godot version
4.1
Issue description
The Normal/Bold/Italic/Bolt Italic/Mono Font Size options under Theme Override > Font Sizes do not appear to have any effect for
.fnt
Angelcode/BMFont bitmap fonts.Same for outlines and probably some other theme font settings, but that makes more sense.
Steps to reproduce
.fnt
type fontThe text was updated successfully, but these errors were encountered: