Font is blurry on small window size in project settings

Godot Version

v4.2.1.stable.mono.official [b09f793f5]

Question

Hello, I set the window size in project settings to 576x324. I made a 2D game and was using small 16x16 sprites, so I didn’t need a large window.
Suddenly I faced a problem in PopupWindow the font in the label was blurry when I set it small, like 8-12px. It’s fine if 14px, but it’s too large for this resolution.

What would be the right way to make a font sharp? Changing the window size will make me redraw everything and also think about how to place my small tilesets in the larger container, which I would like to avoid.

I also tried to play with font resource import settings. It didn’t help.
Small detail, this issue seems like only appears in the popup window.

Hi, unfortunately this is a known issue which is tracked here: PopupMenu from OptionButton placed and scaled wrong when using `canvas_items` stretch mode or scale factor different from `1.0` (DisplayServer regression) · Issue #54030 · godotengine/godot · GitHub

One way you can work around this is to disable “embed subwindows” in your project settings under Display → Window (Make sure to enable advanced settings). This creates “real” windows for popup menus and such instead of rendering them inside the game window, which hopefully isn’t an issue for your game

If you do this the popups and tooltips will become small instead of large and blurry so you may need to increase the size of things inside them, hope this helps!

1 Like

Thank you so much for the information. I will try to do it.

I tried and it works, thank you. But now I have another question. How to position these windows relatively to mouse position in game?
I only see a way is to calculate the resolution ratio on window resize and apply it to mouse global position. Is this the only way of doing it?

you can get the current window with get_window() that should have the info you’ll need

1 Like