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

display/window/stretch/mode to "viewport" results in a debugger error #44771

Closed
CitrusWire opened this issue Dec 28, 2020 · 8 comments
Closed

Comments

@CitrusWire
Copy link

Godot version:
3.2.3

OS/device including version:
Win 7

Project setting: display/window/stretch/mode - set it to "viewport" and when you run the game you get the following error in the Debugger/Errors panel

W 0:00:00.936 _update_root_rect: Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
<C++ Source> scene/main/scene_tree.cpp:1153 @ _update_root_rect()

This seems spurious to me as the user, especially as there are no fonts at all in my project at this point (you get the error even on an empty project).

Steps to reproduce:
As above

Minimal reproduction project:
As above

@Calinou
Copy link
Member

Calinou commented Dec 28, 2020

To solve this, disable font oversampling in the Project Settings. By design, font oversampling can only work when using the 2d stretch mode (or disabled when #21446 will be merged).

We could silence this warning, but then people would wonder why font oversampling doesn't work when using the viewport stretch mode.

@CitrusWire
Copy link
Author

Thanks.

We could silence this warning, but then people would wonder why font oversampling doesn't work when using the viewport stretch mode.

That's the root question: is the Debugging error console the appropriate place for this? For example, I've already encountered a bunch of "gotchas" that don't have a warning, so I'd ask: Why is this one special? (I'm guessing there are other ones I've not stumbled across yet; the question carries for them too).

To me I'd suggest this is exactly the sort of warning that should be in the docs, and if it's this important, under one of those red "Notice" sections (I've not looked because I have no idea where this would be documented; I'm not at that level yet).
Alternately, this error (and any like it), could also include a line telling you how to resolve it (as you helpfully just did).

@Calinou
Copy link
Member

Calinou commented Dec 28, 2020

That's the root question: is the Debugging error console the appropriate place for this?

Yes, because all error and warning messages are printed to it.

@CitrusWire
Copy link
Author

That's the root question: is the Debugging error console the appropriate place for this?

Yes, because all error and warning messages are printed to it.

Indeed, but to be clearer: Should this be a warning/error message?

@Calinou
Copy link
Member

Calinou commented Dec 28, 2020

Indeed, but to be clearer: Should this be a warning/error message?

See what I said above:

We could silence this warning, but then people would wonder why font oversampling doesn't work when using the viewport stretch mode.

@CitrusWire
Copy link
Author

Indeed, but to be clearer: Should this be a warning/error message?

See what I said above:

We could silence this warning, but then people would wonder why font oversampling doesn't work when using the viewport stretch mode.

I did, but my question remains: why is this special over the other gotchas that don't get warnings?

For example just today I've discovered that KinematicBodies are only really effective if they're the root node due to the limits of move_and_slide/look_at (you can't tell them to move another node in the scene); there was no warning when I set them as a non-root node.

Or just now looking at the docs, there's a big warning on the KinematicBodies page that: "You should only do Kinematic body movement in the _physics_process() callback." - makes sense, but if I use move_and_slide within _process, I don't get a warning in the logs.

Genuine question: At what point does a gotcha warrant a warning? No idea what the answer is, in part because different people will find different things gotchas.

@Calinou
Copy link
Member

Calinou commented Dec 28, 2020

At what point does a gotcha warrant a warning?

A gotcha warrants a warning when:

  • It can be detected easily enough.
  • There's little risk of it being a false positive.
  • When a contributor does the required work to print a warning.

@Calinou
Copy link
Member

Calinou commented Jul 7, 2022

Fixed by #55690.

@Calinou Calinou closed this as completed Jul 7, 2022
@Calinou Calinou added this to the 3.4 milestone Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants