-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Button font is rendered incorrectly when using pixel art TTF font #70327
Comments
I can confirm this on v4.0.beta.custom_build [b6e0603] (Linux). The issue doesn't occur if font size is decreased from 7 to 6 on the Button: On the other hand, the other 3 nodes are using a font size of 7, not 6. The "u" also looks different on the Button compared to the other nodes. There seems to be a off-by-one error in general: Button needs a font size that is 1 pixel smaller to look similar to other nodes' font sizes. Here's an example with Button's font size set to 13, and CheckButton/LinkButton/MenuButton set to 14: All screenshots above were taken with a zoom of 200% (integer scaling) to avoid any artifacts. cc @bruvzg |
Button style box or/and text alignment is likely resulting in a non integer horizontal offset, which is in general fine. Disable |
Since the particular font in the MRP is a vector font, but with all vertices aligned to the pixel grid and only line segments, it's not possible to detect if it's a pixel art font automatically. But we probably should auto disable subpixel positioning for true fixed size bitmap TTFs. |
@bruvzg thanks! solved. |
Reopening, as this needs to be documented on Using fonts. |
Godot version
v4.0.beta.custom_build [dcb3754]
System information
Ubuntu 22.10, GTX1060, Vulkan
Issue description
tried to use pixel-art
.ttf font
on my project. Looks likeButton
font renders incorrectly compared to other buttons (checkbutton, link...)below is how it looks, from top to bottom
Button
,CheckButton
,LinkButton
,MenuButton
. All have same font with same size. OnlyButton
glitchedSteps to reproduce
Minimal reproduction project
New Game Project.zip
The text was updated successfully, but these errors were encountered: