#Missing text on button?

9 messages · Page 1 of 1 (latest)

near lichen
#

Okay, I've got a bit of a weird one for you.

I am creating a title screen. There are four buttons. Each button functions perfectly and has text set in the editor, not in code. In fact, the script never touches the text on any of them. And yet, when I use "Quit" on the 4th button, it changes to "Qui" at runtime. Adding any text after the word fixes it. I already have a quick fix by adding a space before and after it (to remain centered) but I would love to understand why it is happening.

This is all of the code for the scene:```
extends CenterContainer

signal play
signal settings
signal htp
signal quit

func _ready():
%Play.button_up.connect(_on_play)
%Settings.button_up.connect(_on_settings)
%HTP.button_up.connect(_on_htp)
%Quit.button_up.connect(_on_quit)

func _on_play():
play.emit()
queue_free()

func _on_settings():
settings.emit()
queue_free()

func _on_htp():
htp.emit()
queue_free()

func _on_quit():
quit.emit()```
I am also including two screenshots, one in the editor and one during runtime with the remote version of %Quit.text being shown. Note that the Text field is exactly the same, but the result is different.

Any ideas?

spark kraken
#

Hey! Could you show the text behaviour on your nodes, the Quit node and one that works out of the box? Is there any difference?

near lichen
#

What do you mean? The images I provided shows exactly what happens. It shows the visual button as well as the node information. They are just plain buttons. No additional script.

urban ridge
#

Does the issue persist if you use a different font type? Or set the font to some other weight? Is this a "default" font?

Q and u of "Quit" are rather wide characters in the font type, maybe the calculations for font width are wrong and thus t gets cut off.

steel turret
#

try making another button underneath labeled Quiz and see what will happen

near lichen
near lichen
#

Also, so every knows, I am using the default font. I have not chosen a custom one, yet, as that is currently a low priority item.

urban ridge
#

I found this issue on GitHub, with exactly the same problem (even the string is the same): https://github.com/godotengine/godot/issues/81624

It seems to be merged to master, but I'm not sure if it's already in a dev release for 4.3, maybe you can check 4.3-dev4 if it's already merged. Be aware to always make a backup before using a dev-version.

Another pointer is, this occurs on custom display sizes. Mostly regarding the editor, but I presume run-time might use dpi settings from the host system as well, which could lead to this.

GitHub

Godot version v4.1.1.stable.flathub.bd6af8e0e System information Godot v4.1.1.stable (bd6af8e) - Freedesktop SDK 23.08 (Flatpak runtime) - Vulkan (Forward+) - dedicated AMD Radeon RX 5500 XT (RADV ...