Skip to content
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

Text is rendered with inconsistent offset/scale due to font oversampling #47957

Open
GarlicPerson opened this issue Apr 16, 2021 · 3 comments
Open

Comments

@GarlicPerson
Copy link

Godot version: 3.2.3.stable

OS/device including version: Win10 Pro, GTX950M Driver: 466.11Both GLES

Issue description: Whenever i set my game to fullscreen the fonts get messed up. It looks like the letters are moved slightly up/down and missing their top/bottom parts with resptect to which direction they moved. The default font / custom fonts behave the same way. What is strange that it only happens when the window is in "fullscreen". So if i simply drag the window around to resize it nothing happens, the fonts are behaving as expected. However if i press the maximise button or run a code to set the window to fullscreen it happens. Thanks in advance!

Stretch:
Mode: 2d
Aspect: keep

Steps to reproduce: Not known. When the same project run by others it behaved as expected

**Minimal reproduction project:

**
Example.zip
1
2

@Calinou
Copy link
Member

Calinou commented Apr 16, 2021

This is likely related to font oversampling not using the correct window size. As a workaround, you can disable font oversampling in the project settings (this will make fonts pixelated/blurry at high resolutions).

Can you reproduce this when the stretch aspect is set to expand? Can you reproduce this when you maximize the project window by clicking the icon in the top-right corner? Can you reproduce this with a different font file (try this one)?

@Calinou Calinou changed the title Fullscreen messup Text is rendered with inconsistent offset/scale due to font oversampling Apr 16, 2021
@GarlicPerson
Copy link
Author

Hi!
Thanks for the reply. I also suspected the font but it's not the case. I tried with different fonts (even the default font gets messed up) with the same result. I tried your ones too just in case. Same result.

Setting aspect to expand won't help either. I can reproduce it any time the window gets set to fullscreen. Doesn't matter how i set it to fullscreen. I tried it by: Maximize button on top right corner, setting the project default to fullscreen, end even via code (OS.window_fullscreen=true).

@Calinou
Copy link
Member

Calinou commented Jul 3, 2021

Note that this bug also occurs in the master branch (tested with 52e3f98). You can reproduce it with the default project font which is now a DynamicFont in master.

Edit: This is now fixed in master thanks to #55905.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

4 participants