-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Label line spacing settings not working as expected in exported Windows binary due to additional newline being inserted #74351
Comments
@FarbrorMartin Please upload a minimal reproduction project to make this easier to troubleshoot. |
This has been happening to me since upgrading to Godot 4 as well. That being said, I just spent all morning trying to create a MRP and could not. In my main project, I diff'd two However, in the process, I discovered that I can fix the issue by simply copying the label's text and pasting it back in (in the Godot editor). The wildest part is that git showed no diffs in the .tscn file when I did this, but it very clearly fixed the issue. And now that I've fixed it, I can't seem to bring the issue back... As far as I can tell, this is ONLY caused by the Label's text content. Changing theme, font, line spacing, LabelSettings, etc had no effect whatsoever. My suspicion is that this is caused by either:
|
Note that I only experienced the problem in exported binaries (Win 64). In the editor it works as expected for me. |
This was happening to me even if I don't set line_spacing (or label_settings) at all, so I think the issue is something different than that setting not being applied. It was happening on |
Probably related to |
I hoped to workaround with custom drawing a multi-line string, Same problem. |
I also had this problem, and changing the autowrap mode to off had no effect. @conradhappeliv's solution of cutting and pasting the text back in, on the contrary, seemed to work great. |
I recently also ran into this issue when setting the text of a label from a C# script. I was using the I created a small test project to show the difference. Project run from editor in Windows: Exported Windows project: On Windows @Calinou I've added a minimal reproduction project: NewLine.zip It uses the C# build of |
Does this issue disappear if you disable Editor > Export > Convert Text Resources to Binary in the Project Settings before exporting? |
Consolidating in #71276. Thanks for the report! |
I know I'm late to the party, but I just wanted to share how I dealt with the issue.
Hope this happens to help someone! -a gamer |
Godot version
4.0-stable
System information
Windows 10, Forward+, Intel HD 620
Issue description
In exported Windows binaries, the line spacing setting on the label font settings does not work properly. The line spacing is not like in the editor at all.
It seems like the setting is not applied at all in the exported binary.
In my example I used soft newlines to make multiple lines in the label.
This is the setting:
Editor:
Running from editor:
Exported game:
Steps to reproduce
Make a label with multiple lines of text. Set the line spacing to 0.
Compare the look of the label running in the editor and running an exported windows binary.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: