-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Buttons disappear on window resize due to font oversampling #37242
Comments
@drmar Please upload a minimal reproduction project to make this easier to troubleshoot. Also, which stretch mode settings did you use in the project? |
Stretch Mode: 2d
I will do this shortly. |
Minimal reproduction project: |
I can reproduce this on Godot 3.2. |
I can reproduce this on Godot 3.2 on Linux. It happens whenever you resize the window width or height to be 1 pixel wide. You can work around this by defining a minimum window size in any script: func _ready():
OS.min_window_size = Vector2(64, 64) I wonder if we should set a minimum window size by default to prevent this bug. This is fairly common in applications after all. |
I actually don't think that the bug happens necessarily when the window is 1px by itself. |
This doesn't occur if you set the stretch mode to This means it's yet another bug related to font oversampling. |
The size and position of the button node increase unacceptably, and it gets out of the window. This only happens to buttons. Here is the demo. Resize the window to the smallest size and restore it, and You can see the size of the play button increases. Edit: It's because of custom fonts. without custom font it works fine as drmar said. |
I also believe that it has something to do with custom fonts. It you recreate my minimal project that I uploaded initially without custom fonts, the buttons will NOT disappear, even when the window is resized to 1px. |
@drmar The default font is a BitmapFont. BitmapFonts don't make use of font oversampling, which is why this bug doesn't occur with BitmapFonts. |
@Calinou Thanks for the info! |
The minimum window size can still be set to `Vector2(0, 0)` in a script if needed. This closes godotengine#37242.
Godot version:
3.2.1
OS/device including version:
macOS Catalina 10.15.3 / MacBookPro11,1
Issue description:
Buttons seem to disappear when the window is resized vertically.
Check the attached video.
Godot-_Bug.mov.zip
Steps to reproduce:
Control Node -> Center Container -> Vertical Box Container -> Button_1, Button_2...
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: