Why does my pixel font keep getting distorted? Godot 4.1
- Edited
I see that the image is not as clear as I thought it would be. Please open it in a new tab to see clearly the difference between the two.
- Is there any scaling involved in your UI somewhere?
- In your project settings did you change any of the "Window Width/Height Override" or Stretch settings?
- Are you displaying these controls in a viewport?
- Do you have scale factor other 100% in your Windows display settings?
Also, when I resize the window, even if I shrink it, it becomes clear and looks great.
Toxe
No, I made sure not to scale this.
No.
Yes, it's in a viewport.
No.
Also, when I resize the window, even if I shrink it, it becomes clear and looks great.
Toxe Yes, I did use windows height override, I'm sorry I forgot about that. I'll change that and report back.
Toxe I've discovered that if I reduce the window height by 2 pixels in the override, the problem is fixed. Weird. but I'll take it. Any insight would be appreciated. And thank you so much.
cindyfollows101 Could you also check what happens if you put one of your selection controls outside of a viewport? Basically inside your main window. Because viewports can behave a bit differently and not scale as one would expect.
- Edited
Toxe Could you expand a little on how I could do that? I realize that I don't know much about this.
- Edited
- Best Answerset by cindyfollows101
cindyfollows101 Can you post a screenshot on how your main scene tree is structured at the moment?
Usually you would have some kind of Main scene that contains all your game elements like maybe a level or the player or enemies or some kind of HUD or UI.
What I meant is: Can you add one of your controls that use your font to this main scene and check how it looks there?
Toxe I'll report back.
Toxe I did that, and you're right, it works perfectly fine on the main node. I'll restructure this scene to try and fix this.
Toxe Whenever I'm using a Vbox or Hbox container to store the texture, it's getting distorted. Any tips on how to fix this?