Why does my pixel font keep getting distorted? Godot 4.1
Asked Answered
P

12

0

I've made sure that the size and resolution are compatible.
You can see a side by side comparison in the image. On the left is how it shows in godot editor, and on the right is how it is rendered.

I've tried pixel snapping, but it made no difference.

This is Godot 4.1 btw.

Primordial answered 18/11, 2023 at 10:2 Comment(0)
R
0

Primordial 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?

Refinery answered 18/11, 2023 at 11:11 Comment(0)
P
0

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.

Primordial answered 18/11, 2023 at 10:5 Comment(0)
R
0

Primordial

  • 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?
Refinery answered 18/11, 2023 at 10:15 Comment(0)
P
0

Also, when I resize the window, even if I shrink it, it becomes clear and looks great.

Primordial answered 18/11, 2023 at 10:16 Comment(0)
P
0

Refinery
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.

Primordial answered 18/11, 2023 at 10:18 Comment(0)
P
0

Refinery Yes, I did use windows height override, I'm sorry I forgot about that. I'll change that and report back.

Primordial answered 18/11, 2023 at 10:34 Comment(0)
P
0

Refinery 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.

Primordial answered 18/11, 2023 at 10:38 Comment(0)
R
0

Primordial 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.

Refinery answered 18/11, 2023 at 10:44 Comment(0)
P
0

Refinery Could you expand a little on how I could do that? I realize that I don't know much about this.

Primordial answered 18/11, 2023 at 10:52 Comment(0)
R
0

Primordial 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?

Refinery answered 18/11, 2023 at 11:11 Comment(0)
P
0

Refinery I'll report back.

Primordial answered 18/11, 2023 at 11:19 Comment(0)
P
0

Refinery 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.

Primordial answered 18/11, 2023 at 11:31 Comment(0)
P
0

Refinery Whenever I'm using a Vbox or Hbox container to store the texture, it's getting distorted. Any tips on how to fix this?

Primordial answered 18/11, 2023 at 13:33 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.